-
Notifications
You must be signed in to change notification settings - Fork 378
otel/xxray: add custom X-Ray propagator that preserves X-Amzn-Trace-Id #3668
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
base: master
Are you sure you want to change the base?
Conversation
acbfcd1 to
4aa96a6
Compare
4aa96a6 to
ab2dd9b
Compare
otel/otel.go
Outdated
| } | ||
|
|
||
| func init() { | ||
| autoprop.RegisterTextMapPropagator("xxray", xxray.NewPropagatorGenerator()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can also add a config field e.g .PropagatorXRayReuseTraceID instead of a new name and create custom implementation if it is set.
ab2dd9b to
003b1dc
Compare
Updates #3663 Signed-off-by: Alexander Yastrebov <[email protected]>
003b1dc to
2c39823
Compare
| } | ||
| value := part[equalsIndex+1:] | ||
| switch { | ||
| case strings.HasPrefix(part, traceIDKey): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is ugly and also allows RootFooBar=123 key 🤷 . Parsing should be done via strings.Cut or similar to #3405
|
maybe we can add these samples in the test: https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-request-tracing.html |
| @@ -0,0 +1,159 @@ | |||
| package xxray | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not xray?
|
Tested this in lab and it is promising, the ALB trace-id is forwarded! example headers forwarded: Just it looks like the |
|
@universam1 can't you use https://opensource.zalando.com/skipper/reference/filters/#tracingtag ? |
Updates #3663