Repository navigation
feat(tracing): propagate W3C trace context across AWS messaging - #540
Merged
Merged
Conversation
Signed-off-by: Arjun Rajappa <arjun.rajappa@ibm.com>
This comment was marked as outdated.
This comment was marked as outdated.
arjun-rajappa
force-pushed
the
aws-w3c-trace-context-propagation
branch
2 times, most recently
from
October 28, 2026 10:25
c80b00a to
db84e3f
Compare
Signed-off-by: Arjun Rajappa <arjun.rajappa@ibm.com>
arjun-rajappa
force-pushed
the
aws-w3c-trace-context-propagation
branch
from
October 28, 2026 10:27
db84e3f to
3fe15e4
Compare
…ana_headers Signed-off-by: Arjun Rajappa <arjun.rajappa@ibm.com>
…Util Signed-off-by: Arjun Rajappa <arjun.rajappa@ibm.com>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Why
Trace context was only propagated through AWS messaging using the proprietary
X-INSTANA-*headers, so services not using the Instana tracer couldn't continue the trace. SQS and SNS also cap messages at 10 message attributes, so adding headers blindly could make a publish fail. Separately, four instrumentations each carried their own copy of atraceparent/tracestateregex, and Shoryuken broke on messages without Instana headers.What
aws_sdk_sqs.rbandaws_sdk_sns.rbinjecttraceparentandtracestatealongsideX_INSTANA_T/S/L.publish_batchis now supported through a sharedinject_trace_attributeshelper.aws_sdk_lambda.rbaddstraceparentandtracestateto theclient_contextpayload and guards against a nil span context.Instana::Util.parse_w3c_trace_context(traceparent, tracestate)inutil.rb.nilon invalid input.trace_id,span_id,leveland theexternal_*values.in=<trace>;<span>tracestate entry takes precedence.Metrics/ModuleLengthis disabled inline onInstana::Util.shoryuken.rb,bunny.rb,grpc.rbandactive_job.rbreplace their duplicated regexes with the shared parser.traceparentwhenX_INSTANA_Tis absent, defaults the level to 1, and starts a fresh span when there is no incoming context.nilfor malformed headers.test/instrumentation/aws_test.rbandtest/instrumentation/shoryuken_test.rb.