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

out_stackdriver: use the correct project ID #2608

Merged
Merged
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 plugins/out_stackdriver/gce_metadata.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ static int fetch_metadata(struct flb_stackdriver *ctx,
/* If runtime test mode is enabled, add test data */
if (ctx->ins->test_mode == FLB_TRUE) {
if (strcmp(uri, FLB_STD_METADATA_PROJECT_ID_URI) == 0) {
flb_sds_cat(payload, "111222333", 9);
flb_sds_cat(payload, "fluent-bit-test", 9);
return 0;
}
else if (strcmp(uri, FLB_STD_METADATA_ZONE_URI) == 0) {
Expand Down
2 changes: 1 addition & 1 deletion plugins/out_stackdriver/gce_metadata.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include "stackdriver.h"

/* Project ID metadata URI */
#define FLB_STD_METADATA_PROJECT_ID_URI "/computeMetadata/v1/project/numeric-project-id"
#define FLB_STD_METADATA_PROJECT_ID_URI "/computeMetadata/v1/project/project-id"

/* Zone metadata URI */
#define FLB_STD_METADATA_ZONE_URI "/computeMetadata/v1/instance/zone"
Expand Down
2 changes: 1 addition & 1 deletion tests/runtime/out_stackdriver.c
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ static void cb_check_gce_instance(void *ctx, int ffd,

/* project id */
ret = mp_kv_cmp(res_data, res_size,
"$resource['labels']['project_id']", "111222333");
"$resource['labels']['project_id']", "fluent-bit-test");
TEST_CHECK(ret == FLB_TRUE);

/* zone */
Expand Down