Skip to content

Cache SharedSpan::is_sampled for deferred user tracing spans - #263

Merged
TheJokr merged 1 commit into
mainfrom
lblocher/span-sampled-mut
Sep 4, 2026
Merged

Cache SharedSpan::is_sampled for deferred user tracing spans#263
TheJokr merged 1 commit into
mainfrom
lblocher/span-sampled-mut

Conversation

@TheJokr

@TheJokr TheJokr commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

Relaxed atomic load and stores are just regular load and stores on x86 and arm64, so this adds zero cost for regular spans and allows us to avoid some more lock accesses for deferred user tracing spans.

@fisherdarling fisherdarling left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

didn't mean to stamp! whoops

@TheJokr TheJokr self-assigned this Sep 3, 2026
Relaxed atomic load and stores are just regular load and stores on x86
and arm64, so this adds zero cost for regular spans and allows us to
avoid some more lock accesses for deferred user tracing spans.
@TheJokr
TheJokr force-pushed the lblocher/span-sampled-mut branch from dd045e2 to 3fd770e Compare September 4, 2026 17:24
@TheJokr
TheJokr merged commit 31736a7 into main Sep 4, 2026
20 checks passed
@TheJokr
TheJokr deleted the lblocher/span-sampled-mut branch September 4, 2026 17:40
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