GoogleCloudPlatform / GoogleCloudPlatform/k8s-stackdriver
Linking traces to log entries
- Dominant language
- Go
- Stars
- 409
- Forks
- 236
- Avg merge
- 2h 34m
- Merged PRs (30d)
- 9
Description
I'm running a Golang HTTP server on K8s using OpenCensus for tracing. In my logs I set the JSON field `trace` to `"projects/$PROJECT/traces/$TRACE_ID"`.
If I click on the "Log" link in a Stackdriver trace (see screenshot) I end up with zero log results. However, if I manually replace `trace=...` with `jsonPayload.trace=...` the filter works and I get the log entries associated with the trace I clicked on.
Is there anything I can do to make this work automatically? Ie. is there any way to set the `trace` field directly instead of just the `jsonPayload.trace`?

Contributor guide
Assessment
This issue has not been assessed yet.