Skip to content

feat: add Span::discard - #13

Merged
TheJokr merged 1 commit into
cloudflare:masterfrom
mar-cf:user-span-discard
Oct 9, 2026
Merged

TheJokr merged 1 commit into
cloudflare:masterfrom
mar-cf:user-span-discard

Conversation

@mar-cf

@mar-cf mar-cf commented Oct 8, 2026

Copy link
Copy Markdown

Some spans only turn out to be uninteresting after they started, e.g. a routing span when nothing matched. Callers had no way to drop such a span without it being reported.

Span::discard clears the span's inner state and drops its finish callback without calling it, so Drop sends nothing and the span behaves like an inactive one from then on.

Some spans only turn out to be uninteresting after they started, e.g. a routing span when nothing
matched. Callers had no way to drop such a span without it being reported.

`Span::discard` clears the span's inner state and drops its finish callback without calling it, so
`Drop` sends nothing and the span behaves like an inactive one from then on.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@TheJokr
TheJokr merged commit f0fdb5e into cloudflare:master Oct 9, 2026
4 checks passed
@TheJokr TheJokr mentioned this pull request Oct 9, 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