-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Stackdriver Trace and Custom Log Name Support #2683
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
Changes from all commits
3849ae8
d1c5b21
237d727
6d886bc
3a0d2cc
3912b90
73df60c
0a2c653
97e64e5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -50,6 +50,9 @@ | |
| #define MONITORED_RESOURCE_KEY "logging.googleapis.com/monitored_resource" | ||
| #define LOCAL_RESOURCE_ID_KEY "logging.googleapis.com/local_resource_id" | ||
| #define DEFAULT_LABELS_KEY "logging.googleapis.com/labels" | ||
| #define DEFAULT_SEVERITY_KEY "logging.googleapis.com/severity" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we keep the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I was thinking originally that if we don't have a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done |
||
| #define DEFAULT_TRACE_KEY "logging.googleapis.com/trace" | ||
| #define DEFAULT_LOG_NAME_KEY "logging.googleapis.com/logName" | ||
| #define DEFAULT_INSERT_ID_KEY "logging.googleapis.com/insertId" | ||
| #define SOURCELOCATION_FIELD_IN_JSON "logging.googleapis.com/sourceLocation" | ||
| #define HTTPREQUEST_FIELD_IN_JSON "logging.googleapis.com/http_request" | ||
|
|
@@ -108,6 +111,9 @@ struct flb_stackdriver { | |
| /* other */ | ||
| flb_sds_t resource; | ||
| flb_sds_t severity_key; | ||
| flb_sds_t trace_key; | ||
| flb_sds_t log_name_key; | ||
| bool autoformat_stackdriver_trace; | ||
|
|
||
| /* oauth2 context */ | ||
| struct flb_oauth2 *o; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| #define LOG_NAME_OVERRIDE "[" \ | ||
| "1591111124," \ | ||
| "{" \ | ||
| "\"custom_log_name_key\": \"custom_log_name\"" \ | ||
| "}]" | ||
|
|
||
| #define LOG_NAME_NO_OVERRIDE "[" \ | ||
| "1591111124," \ | ||
| "{" \ | ||
| "}]" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| #define TRACE_COMMON_CASE "[" \ | ||
| "1591111124," \ | ||
| "{" \ | ||
| "\"trace\": \"test-trace-id-xyz\"" \ | ||
| "}]" | ||
|
|
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ctx->severity_keyis added to the list to remove the duplicate injsonPayload, but this can be treated as a breaking change if someone relies on it injsonPayload. If we follow the semantic versioning, this will require changing the major version. Please, advise if we need any special flag which controls whether or not to remove the severity key from the payload.