Skip to content

[ENG-12937] don't set sentry env to base url - #354

Merged
felliott merged 1 commit into
mainfrom
hotfix/sentry-env-reporting
Dec 4, 2026
Merged

felliott merged 1 commit into
mainfrom
hotfix/sentry-env-reporting

Conversation

@felliott

@felliott felliott commented Dec 4, 2026 •

Copy link
Copy Markdown
Member

Let Sentry determine the env from the SENTRY_ENVIRONMENT envvar,
which is does as log as environment=foo isn't passed to init().

Ticket

ENG-12937

Purpose

Gravyvalet errors are showing up in sentry when filtering by env b/c the GV settings code sets it to an invalid value (the host url).

Changes

Stop setting it to allow CE-specified envvars to set the environment.

Side Effects

Should be able to find GV errors in nprod environments after this.

API Documentation

No.

QE Notes

No.

CE Notes

None.

 Let Sentry determine the env from the SENTRY_ENVIRONMENT envvar,
 which is does as log as `environment=foo` isn't passed to `init()`.
@felliott
felliott merged commit 818694f into main Dec 4, 2026
2 checks passed
Comment thread app/settings.py
else:
sentry_sdk.init(
dsn=env.SENTRY_DSN,
environment=env.OSF_BASE_URL,

@cslzchen cslzchen Dec 4, 2026 •

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.

I remember we changed sentry init for gv for celery improvement, let me double check

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.

3 participants