Skip to content

fix(spans): Write falsy values when converting to trace item in span buffer #93771

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 18, 2025

Conversation

gggritso
Copy link
Member

The walrus operator := in the conditional while renaming sentry. fields was skipping falsy values like False and 0. This is significant in some cases like duration_ms, which might come back as 0 from Relay (that's a separate problem). There's a big difference here in whether the duration is unset vs. 0! Instead, manually check for None before writing.

@github-actions github-actions bot added the Scope: Backend Automatically applied to PRs that change backend components label Jun 17, 2025
@gggritso gggritso requested a review from untitaker June 18, 2025 03:14
@gggritso gggritso marked this pull request as ready for review June 18, 2025 03:14
@gggritso gggritso requested review from a team as code owners June 18, 2025 03:14
@gggritso gggritso merged commit ff762b7 into master Jun 18, 2025
65 checks passed
@gggritso gggritso deleted the georgegritsouk/ope-31-write-span-duration-to-eap branch June 18, 2025 11:59
andrewshie-sentry pushed a commit that referenced this pull request Jun 19, 2025
…buffer (#93771)

The walrus operator `:=` in the conditional while renaming `sentry.`
fields was skipping falsy values like `False` and `0`. This is
significant in some cases like `duration_ms`, which might come back as
`0` from Relay (that's a separate problem). There's a big difference
here in whether the duration is unset vs. 0! Instead, manually check for
`None` before writing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Backend Automatically applied to PRs that change backend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants