-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
out_stackdriver: add trace and Custom Log Name Support (#2683)
- Add trace to stackdriver output. This is necessary for stackdriver to correlate request logs with app logs. See https://medium.com/google-cloud/combining-correlated-log-lines-in-google-stackdriver-dd23284aeb29 - Added a default label for trace_key which is needed for the proper removal from the jsonPayload. Signed-off-by: Todor Petrov <[email protected]>
- Loading branch information
1 parent
e1a0859
commit b7c7081
Showing
6 changed files
with
388 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
tests/runtime/data/stackdriver/stackdriver_test_log_name.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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," \ | ||
"{" \ | ||
"}]" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#define TRACE_COMMON_CASE "[" \ | ||
"1591111124," \ | ||
"{" \ | ||
"\"trace\": \"test-trace-id-xyz\"" \ | ||
"}]" | ||
|
Oops, something went wrong.