Skip to content

fix(trace-metrics): Replace nil trace IDs with a random one#6077

Closed
phacops wants to merge 1 commit into
masterfrom
fix/trace-metrics-nil-trace-id
Closed

fix(trace-metrics): Replace nil trace IDs with a random one#6077
phacops wants to merge 1 commit into
masterfrom
fix/trace-metrics-nil-trace-id

Conversation

@phacops

@phacops phacops commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Trace metrics received with an all-zero (nil) trace ID now get a randomly generated trace ID during normalization. A nil trace ID is invalid per the W3C trace context spec, but it parses successfully into TraceId and was previously forwarded to the stored trace item as-is, grouping all such metrics under a single bogus trace.

🤖 Generated with Claude Code

@phacops phacops requested a review from a team as a code owner June 10, 2026 23:53
@phacops phacops force-pushed the fix/trace-metrics-nil-trace-id branch 2 times, most recently from 14b4753 to d845494 Compare June 11, 2026 00:00
An all-zero trace ID is invalid per the W3C trace context spec, but it
parses successfully and was passed through to the stored trace item
as-is. Generate a random trace ID during normalization instead, so
these metrics no longer get grouped under a single bogus trace.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@phacops phacops force-pushed the fix/trace-metrics-nil-trace-id branch from da90599 to 5799142 Compare June 11, 2026 00:04
@getsentry getsentry deleted a comment from sentry Bot Jun 11, 2026
@jjbayer

jjbayer commented Jun 11, 2026

Copy link
Copy Markdown
Member

Closing in favor of #6079.

@jjbayer jjbayer closed this Jun 11, 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.

2 participants