Skip to content

ref(errors): Unconditionally create a trace context#6009

Open
Dav1dde wants to merge 4 commits into
masterfrom
dav1d/always-create-trace-ctx
Open

ref(errors): Unconditionally create a trace context#6009
Dav1dde wants to merge 4 commits into
masterfrom
dav1d/always-create-trace-ctx

Conversation

@Dav1dde
Copy link
Copy Markdown
Member

@Dav1dde Dav1dde commented May 20, 2026

Similar to: #5979, removes the feature flag this was gated behind.

But with slightly different behaviour (in order of importane):

  • Fixes a bug where the trace context of a transaction was modified, this can/should never happen. Transactions must always contain a valid trace context.
  • No longer adds any metadata to the trace_id and span_id fields, when they are created. This was already inconsistent between no trace context and a partial trace context. If any metadata is desired, we should add it to the context instead (if it gets created). Metadata for missing attributes is preserved (although I don't think that's that important).
  • Keeps the flag on the normalization config, to ease testing for the rest of Relay, not all normaliation tests need to be updated to assert a trace context now. This is also a good place to add some documentation.
  • Fixes some tests that before asserted incorrect behaviour (e.g. contexts on transactions), adds more integration tests.

@Dav1dde Dav1dde requested a review from a team as a code owner May 20, 2026 11:27
Comment thread relay-event-normalization/src/event.rs
Comment thread relay-event-normalization/src/event.rs
@Dav1dde Dav1dde force-pushed the dav1d/always-create-trace-ctx branch from 3701903 to 0c4e69b Compare May 20, 2026 11:46
cursor[bot]

This comment was marked as outdated.

@Dav1dde Dav1dde force-pushed the dav1d/always-create-trace-ctx branch from 0c4e69b to 2f720e9 Compare May 20, 2026 11:50
@Dav1dde Dav1dde self-assigned this May 20, 2026
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.

3 participants