feat(ext/cache): inject W3C traceparent/tracestate into LSC HTTP requests#32661
Open
wperron wants to merge 1 commit intodenoland:mainfrom
Open
feat(ext/cache): inject W3C traceparent/tracestate into LSC HTTP requests#32661wperron wants to merge 1 commit intodenoland:mainfrom
wperron wants to merge 1 commit intodenoland:mainfrom
Conversation
2c8fc6c to
c9925b8
Compare
…ests Extract the active trace context on the JS side using the telemetry propagators (ContextManager.active() + PROPAGATORS.inject()) and pass the traceparent and tracestate values as optional string fields through the cache op calls (op_cache_put, op_cache_match, op_cache_delete). On the Rust side, CacheShard::get_object, put_object, and put_object_empty now accept an optional trace_headers parameter and inject the corresponding HTTP headers into outgoing LSC requests, enabling distributed trace propagation through the cache layer.
c9925b8 to
f8a7624
Compare
kajukitli
reviewed
Mar 12, 2026
Contributor
kajukitli
left a comment
There was a problem hiding this comment.
looks fine overall, but i think this needs a test before merging
right now the JS side is extracting active trace context and threading traceparent / tracestate through the cache ops into LSC requests, but there's no coverage proving those headers actually make it onto the outgoing HTTP calls.
without a test this is pretty easy to regress later because the propagation path crosses a lot of layers:
01_cache.js -> op structs -> lsc backend -> shard request building
suggestion: add an integration test with tracing enabled and a fake LSC endpoint that records request headers, then assert traceparent is present on:
cache.put()cache.match()cache.delete()
and ideally also assert tracestate is forwarded when set.
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.
Extract the active trace context on the JS side using the telemetry propagators (ContextManager.active() + PROPAGATORS.inject()) and pass the traceparent and tracestate values as optional string fields through the cache op calls (op_cache_put, op_cache_match, op_cache_delete).
On the Rust side, CacheShard::get_object, put_object, and put_object_empty now accept an optional trace_headers parameter and inject the corresponding HTTP headers into outgoing LSC requests, enabling distributed trace propagation through the cache layer.