Skip to content

config: simplify SentryConfig env override (bug 2058322) - #175

Merged
shtrom merged 1 commit into
mainfrom
bug2058322/sentry-dsn-env
Oct 21, 2026
Merged

shtrom merged 1 commit into
mainfrom
bug2058322/sentry-dsn-env

Conversation

@shtrom

@shtrom shtrom commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

We used an AliasChoices to avoid double-prefixing the SENTRY_DSN environment variable. This had the unexpected side-effect that the variable would not override values explicitly provided from the configuration file, even if just empty strings, as SENTRY_SENTRY_DSN would.

We just simplify the logic by renaming the sentry_dsn attribute in the sentry sub-config to just dsn. This now directly maps to the desired SENTRY_DSN, and behaves as expected.

@shtrom
shtrom requested a review from a team as a code owner October 21, 2026 01:52
@shtrom

shtrom commented Oct 21, 2026

Copy link
Copy Markdown
Member Author

@shtrom
shtrom merged commit d3db7d0 into main Oct 21, 2026
1 check passed
@shtrom
shtrom deleted the bug2058322/sentry-dsn-env branch October 21, 2026 03:58
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