-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
environment: default and env var #8677
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
|
@@ -6,10 +6,18 @@ description: "Learn how to configure your SDK to tell Sentry about your environm | |||
|
|||
Environments tell you where an error occurred, whether that's in your production system, your staging server, or elsewhere. | |||
|
|||
<Note> | |||
|
|||
The default value is `production`. |
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.
The default value is `production`. | |
The default value is `production`. |
I'm not sure I understand this correctly. Are we trying to tell the user that the default environment is production? If so, why would there be a default since this is supposed to tell you where an error occurred?
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.
Because without a default value it was challenging in the product for some features, so we needed to have a value and since Sentry runs in prod, by default we went with production
.
It's documented here but can't link to anchor (no anchor): https://develop.sentry.dev/sdk/event-payloads/
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.
PR that added to develop:
Unfortunately I didn't add the context of the discussion (which happened on DIscord with @dcramer and @mitsuhiko)
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.
Need a bit of clarification :)
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.
Hey @bruno-garcia - This file no longer exists due to the refactor Stephanie did to prep for the Next.js rewrite transition, and has been pulled out into separate mdx files for each platform.
To make these docs make more sense, I think we should clarify this line:
Sentry automatically creates an environment when it receives an event with the
environment
parameter set.
Since there's a default value set, does that mean that if a user doesn't set environment
, all events will be tagged as production
and Sentry will automatically create a corresponding "default" environment?
I think that's the kind of information we should add to this docs page, as well as the product page for environments (/product/sentry-basics/concepts/environments/)
That's correct. The default environment is
Wouldn't hurt being there too. |
Ideally we mention the env var only where its applicable. Most SDKs, when running via the command line, for example. But not really mobile apps.