otel/xxray: add custom X-Ray propagator that preserves X-Amzn-Trace-Id#3668
otel/xxray: add custom X-Ray propagator that preserves X-Amzn-Trace-Id#3668AlexanderYastrebov wants to merge 1 commit intomasterfrom
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.
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 <alexander.yastrebov@zalando.de>
003b1dc to
2c39823
Compare
| } | ||
| value := part[equalsIndex+1:] | ||
| switch { | ||
| case strings.HasPrefix(part, traceIDKey): |
There was a problem hiding this comment.
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 | |||
|
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