Skip to content
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

Closed
wants to merge 1 commit into from
Closed

Conversation

bruno-garcia
Copy link
Member

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.

Copy link

vercel bot commented Dec 9, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sentry-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 9, 2023 5:36pm
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
sentry-docs-next ⬜️ Ignored (Inspect) Dec 9, 2023 5:36pm

@@ -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`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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?

Copy link
Member Author

@bruno-garcia bruno-garcia Dec 18, 2023

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/

image

Copy link
Member Author

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)

Copy link
Contributor

@lizokm lizokm left a 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 :)

Copy link
Contributor

@shanamatthews shanamatthews left a 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/)

@bruno-garcia
Copy link
Member Author

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?

That's correct. The default environment is production.

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/)

Wouldn't hurt being there too.

@bruno-garcia bruno-garcia deleted the bruno-garcia-patch-1 branch January 2, 2024 18:58
@github-actions github-actions bot locked and limited conversation to collaborators Jan 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants