Skip to content

ref(spanv2): Normalize client sample rates in attributes#6010

Open
Dav1dde wants to merge 1 commit into
masterfrom
dav1d/validate-sample-rates
Open

ref(spanv2): Normalize client sample rates in attributes#6010
Dav1dde wants to merge 1 commit into
masterfrom
dav1d/validate-sample-rates

Conversation

@Dav1dde
Copy link
Copy Markdown
Member

@Dav1dde Dav1dde commented May 20, 2026

Normalize a client sample rate to be valid.

@Dav1dde Dav1dde requested a review from a team as a code owner May 20, 2026 13:48
@Dav1dde Dav1dde self-assigned this May 20, 2026
@Dav1dde Dav1dde force-pushed the dav1d/validate-sample-rates branch from f28f1ff to 783f291 Compare May 20, 2026 13:57
attributes.insert("sentry.server_sample_rate", server_sample_rate.to_f64());
attributes.insert(
"sentry.server_sample_rate",
server_sample_rate.to_f64().clamp(1e-9, 1.0),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Since measurements conversion is at the front of my brain right now: should the same thing happen during v1 -> v2 span conversion?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yeah it would be good if we could normalize in all places, it's just a bit of a pain.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants