Skip to content

ref(tracing): Read release and environment once in DynamicSamplingContext to drop Mago baseline entry - #2428

Merged
stayallive merged 1 commit into
masterfrom
ref/dsc-read-release-environment-once
Nov 26, 2026
Merged

stayallive merged 1 commit into
masterfrom
ref/dsc-read-release-environment-once

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

Removes one entry from the Mago baseline (analysis-baseline.toml):

setOrgOptions() called $options->getRelease() and $options->getEnvironment() again after each null check, so Mago couldn't narrow the value passed to set(). Each option is now read into a local once and the local is passed to set().

This is safe because both are plain Options getters, so the branches and the values written to the DSC stay the same.

via automation sched_a59acc45df166a80a839d0b32321e740 · Run ID sched_a59acc45df166a80a839d0b32321e740:1795683600000.

--

View Session [Sentry]

…text to drop Mago baseline entry

setOrgOptions() called Options::getRelease() and getEnvironment() again
after each null check, so Mago could not narrow the value passed to
DynamicSamplingContext::set(). Read each option into a local once and
remove the possibly-null-argument entry from analysis-baseline.toml.
@stayallive
stayallive marked this pull request as ready for review November 26, 2026 10:19
@stayallive
stayallive requested a review from a team as a code owner November 26, 2026 10:19
@stayallive
stayallive merged commit 945d0ea into master Nov 26, 2026
59 checks passed
@stayallive
stayallive deleted the ref/dsc-read-release-environment-once branch November 26, 2026 10:19
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.

1 participant