-
Notifications
You must be signed in to change notification settings - Fork 327
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
W3C context propagation does not properly create local context from received traceparent header #975
Comments
ping @duxet, the nasty tester is at it again...:) |
Do you two have this under control, or should I spend some time on it? :D |
@SimunKaracic I don't have a recent fork of Kamon so I assume it's much faster for you to fix it. |
Thx, I really hate the typical issue ticket..."nnn doesn't work" without any description nor analysis |
Fixed in 2.1.15! |
Issue
When creating the local context using the header
traceparent
the local spanID is incorrectly using the received traceID.Steps to reproduce
Enable w3c propagation
Run simple app
Send request with w3c header
The printout from the app is
As one can see the traceID and spanID are equal, which they of course should not be.
Reason
Looking at the code where the context is created (snippet below)
https://github.com/kamon-io/Kamon/blob/master/core/kamon-core/src/main/scala/kamon/trace/SpanPropagation.scala#L97
The
Span.Remote
is not correct, it is using thetraceID
as the new spanID.Since W3C only propagates the parent context it means a new spanId needs to be generated and added to the context.
The text was updated successfully, but these errors were encountered: