GoogleCloudPlatform / GoogleCloudPlatform/k8s-stackdriver

Linking traces to log entries

Open
#164 1 comment 0 reactions 0 assignees View on GitHub
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`?

![trace](https://user-images.githubusercontent.com/3739231/41061079-c95ce6be-69d1-11e8-997c-e6f8c449d2f0.png)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.