Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

workflows: bump hashicorp/setup-terraform from 1 to 3 #30

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/1.7.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
k8s_release: ${{ matrix.k8s-release }}
k8s_release_formatted: ${{ steps.formatted_release.outputs.replaced }}

- uses: hashicorp/setup-terraform@v1
- uses: hashicorp/setup-terraform@v3
with:
cli_config_credentials_hostname: 'app.terraform.io'
cli_config_credentials_token: ${{ secrets.TF_API_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/1.8.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ jobs:
k8s_release: ${{ matrix.k8s-release }}
k8s_release_formatted: ${{ steps.formatted_release.outputs.replaced }}

- uses: hashicorp/setup-terraform@v1
- uses: hashicorp/setup-terraform@v3
with:
cli_config_credentials_hostname: 'app.terraform.io'
cli_config_credentials_token: ${{ secrets.TF_API_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/benchmark-run-master.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
k8s_release: ${{ matrix.k8s-release }}
k8s_release_formatted: ${{ steps.formatted_release.outputs.replaced }}

- uses: hashicorp/setup-terraform@v1
- uses: hashicorp/setup-terraform@v3
with:
cli_config_credentials_hostname: 'app.terraform.io'
cli_config_credentials_token: ${{ secrets.TF_API_TOKEN }}
Expand Down
5 changes: 5 additions & 0 deletions plugins/out_datadog/datadog.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include <fluent-bit/flb_time.h>
#include <fluent-bit/flb_gzip.h>
#include <fluent-bit/flb_config_map.h>
#include <fluent-bit/flb_version.h>

#include <msgpack.h>

Expand Down Expand Up @@ -354,7 +355,11 @@ static void cb_datadog_flush(struct flb_event_chunk *event_chunk,
FLB_OUTPUT_RETURN(FLB_ERROR);
}

/* Add the required headers to the URI */
flb_http_add_header(client, "User-Agent", 10, "Fluent-Bit", 10);
flb_http_add_header(client, FLB_DATADOG_API_HDR, sizeof(FLB_DATADOG_API_HDR) - 1, ctx->api_key, flb_sds_len(ctx->api_key));
flb_http_add_header(client, FLB_DATADOG_ORIGIN_HDR, sizeof(FLB_DATADOG_ORIGIN_HDR) - 1, "Fluent-Bit", 10);
flb_http_add_header(client, FLB_DATADOG_ORIGIN_VERSION_HDR, sizeof(FLB_DATADOG_ORIGIN_VERSION_HDR) - 1, FLB_VERSION_STR, sizeof(FLB_VERSION_STR) - 1);
flb_http_add_header(client,
FLB_DATADOG_CONTENT_TYPE, sizeof(FLB_DATADOG_CONTENT_TYPE) - 1,
FLB_DATADOG_MIME_JSON, sizeof(FLB_DATADOG_MIME_JSON) - 1);
Expand Down
4 changes: 4 additions & 0 deletions plugins/out_datadog/datadog.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@
#define FLB_DATADOG_REMAP_PROVIDER "ecs"
#define FLB_DATADOG_TAG_SEPERATOR ","

#define FLB_DATADOG_API_HDR "DD-API-KEY"
#define FLB_DATADOG_ORIGIN_HDR "DD-EVP-ORIGIN"
#define FLB_DATADOG_ORIGIN_VERSION_HDR "DD-EVP-ORIGIN-VERSION"

#define FLB_DATADOG_CONTENT_TYPE "Content-Type"
#define FLB_DATADOG_MIME_JSON "application/json"

Expand Down
5 changes: 2 additions & 3 deletions plugins/out_datadog/datadog_conf.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,14 +115,13 @@ struct flb_out_datadog *flb_datadog_conf_create(struct flb_output_instance *ins,
ctx->remap = tmp && (strlen(tmp) == strlen(FLB_DATADOG_REMAP_PROVIDER)) && \
(strncmp(tmp, FLB_DATADOG_REMAP_PROVIDER, strlen(tmp)) == 0);

ctx->uri = flb_sds_create("/v1/input/");
ctx->uri = flb_sds_create("/api/v2/logs");
if (!ctx->uri) {
flb_plg_error(ctx->ins, "error on uri generation");
flb_datadog_conf_destroy(ctx);
return NULL;
}
/* Add the api_key to the URI */
ctx->uri = flb_sds_cat(ctx->uri, ctx->api_key, flb_sds_len(ctx->api_key));

flb_plg_debug(ctx->ins, "uri: %s", ctx->uri);

/* Get network configuration */
Expand Down
2 changes: 1 addition & 1 deletion plugins/out_datadog/datadog_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#define FLB_OUT_DATADOG_CONF_H

#include <fluent-bit/flb_output.h>
#include <fluent-bit/flb_config.h>
#include <fluent-bit/flb_config.h>

#include "datadog.h"

Expand Down
Loading