Skip to content

Consider tracing span id and trace id separately in the log #9491

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

Closed
davidfowl opened this issue Apr 18, 2019 · 4 comments · Fixed by #11211
Closed

Consider tracing span id and trace id separately in the log #9491

davidfowl opened this issue Apr 18, 2019 · 4 comments · Fixed by #11211
Assignees
Labels
accepted This issue has completed "acceptance" testing (including accessibility) area-hosting Includes Hosting area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions enhancement This issue represents an ask for new feature or an enhancement to an existing one

Comments

@davidfowl
Copy link
Member

davidfowl commented Apr 18, 2019

Seems to like open census:

https://github.com/census-instrumentation/opencensus-specs/blob/c3fd41b28fed96ceffc8c35af280d74cacea3ab2/trace/LogCorrelation.md#key-names-for-tracing-data

cc: @SergeyKanzhelev @lmolkova

@lmolkova
Copy link

lmolkova commented May 2, 2019

We should use W3C trace context notions (OpenCensus names are the same) probably in CamelCase as other scopes.

To make it useful we need to log parent-id as well otherwise we lose causation in the logs. When an incoming request is received, it gets TraceId and ParentId in the headers. New SpanId is generated.
So I propose to log all three.

Also, assuming we keep Activity default behavior (which is Request-Id if there is no incoming w3c header), we have to map legacy format to these names.

  • TraceId is Activity.RootId
  • ParentId is Activity.ParentId
  • SpanId is Activity.Id // This seems to be very confusing.

@davidfowl davidfowl self-assigned this May 2, 2019
@davidfowl davidfowl added enhancement This issue represents an ask for new feature or an enhancement to an existing one feature labels Jun 17, 2019
@davidfowl
Copy link
Member Author

Verifying this is blocked on #11404

@davidfowl
Copy link
Member Author

image

@davidfowl davidfowl added the accepted This issue has completed "acceptance" testing (including accessibility) label Jun 27, 2019
@davidfowl
Copy link
Member Author

Verified in 3.0.0-preview7.19326.6

@ghost ghost locked as resolved and limited conversation to collaborators Dec 3, 2019
@amcasey amcasey added the area-hosting Includes Hosting label Jun 1, 2023
@amcasey amcasey added area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions and removed area-runtime labels Aug 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
accepted This issue has completed "acceptance" testing (including accessibility) area-hosting Includes Hosting area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions enhancement This issue represents an ask for new feature or an enhancement to an existing one
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants