Skip to content

Introduce routing metadata as a span property#11

Merged
TheJokr merged 2 commits into
cloudflare:masterfrom
mar-cf:user-tracing
Jul 13, 2026
Merged

Introduce routing metadata as a span property#11
TheJokr merged 2 commits into
cloudflare:masterfrom
mar-cf:user-tracing

Conversation

@mar-cf

@mar-cf mar-cf commented Jun 24, 2026

Copy link
Copy Markdown

Introduces RoutingMetadata as a span property describing where a span's data should be routed. It's set once via StartSpanOptions at span creation, inherited by child spans, and carried through into the emitted FinishedSpan so exporters can act on it.

@mar-cf mar-cf force-pushed the user-tracing branch 2 times, most recently from 4c88f71 to f72f038 Compare July 1, 2026 10:22
@TheJokr TheJokr self-requested a review July 6, 2026 15:43

@TheJokr TheJokr left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM other than 1 nit

Comment thread src/span.rs Outdated
Spans gain an optional routing property, set at construction and
inherited by children. `RoutingMetadata` is a trait — `group_key`
(groups spans for batching) and `encode` (produces the wire value) —
so consumers define their own routing type; spans store it as
`Option<Arc<dyn RoutingMetadata>>`.
@TheJokr TheJokr merged commit a41ae11 into cloudflare:master Jul 13, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants