-
Notifications
You must be signed in to change notification settings - Fork 426
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
Pass SENTRY_ENVIRONMENT
through to frontend
#8799
Conversation
Propagate the Sentry environment name through to the frontend code that initializes the Sentry JS SDK.
@@ -27,6 +27,7 @@ def add_renderer_globals(event): | |||
if "h.sentry_dsn_frontend" in request.registry.settings: | |||
event["frontend_settings"]["sentry"] = { | |||
"dsn": request.registry.settings["h.sentry_dsn_frontend"], | |||
"environment": request.registry.settings["h.sentry_environment"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
h.sentry_environment
is currently always set. It takes its value from the SENTRY_ENVIRONMENT
env var with a default of dev
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have (in h-prod):
SENTRY_ENVIRONMENT
and
ENV
both with value a value of prod
👍
We might want to look at combine those at some point, outside of scope here.
Alejandro is away this week, so I'm tagging BE folks for review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good 👍
@@ -27,6 +27,7 @@ def add_renderer_globals(event): | |||
if "h.sentry_dsn_frontend" in request.registry.settings: | |||
event["frontend_settings"]["sentry"] = { | |||
"dsn": request.registry.settings["h.sentry_dsn_frontend"], | |||
"environment": request.registry.settings["h.sentry_environment"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have (in h-prod):
SENTRY_ENVIRONMENT
and
ENV
both with value a value of prod
👍
We might want to look at combine those at some point, outside of scope here.
Propagate the Sentry environment name through to the frontend code that initializes the Sentry JS SDK.