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

Nuxt environment not automatically detected by Sentry #15147

Open
3 tasks done
maximepvrt opened this issue Jan 23, 2025 · 1 comment
Open
3 tasks done

Nuxt environment not automatically detected by Sentry #15147

maximepvrt opened this issue Jan 23, 2025 · 1 comment
Labels
Package: nuxt Issues related to the Sentry Nuxt SDK

Comments

@maximepvrt
Copy link
Contributor

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/nuxt

SDK Version

8.51.0

Framework Version

Nuxt 3.14.1592

Link to Sentry event

https://benevolt.sentry.io/issues/6239844009/?project=4508678079905792&query=is%3Aunresolved%20level%3Aerror&referrer=issue-stream&statsPeriod=14d&stream_index=8

Reproduction Example/SDK Setup

No response

Steps to Reproduce

  1. Create a Nuxt.js application.
  2. Install and configure Sentry by following the official documentation.
  3. Launch the application in development mode with pnpm dev.
  4. Generate a JavaScript error in the application.
  5. Check the environment associated with the error in Sentry.

Expected Result

The environment should be automatically detected as "development".

Suggestions

Disable by default in development mode: An option to disable Sentry by default in development mode could be added. This would prevent sending development errors to Sentry, which can be annoying.

Actual Result

The environment reported in Sentry is "production".

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 3 Jan 23, 2025
@github-actions github-actions bot added the Package: nuxt Issues related to the Sentry Nuxt SDK label Jan 23, 2025
@andreiborza
Copy link
Member

Hi @maximepvrt, thanks for filing this.

As we don't currently recommend users to use the development mode when using our SDK it's probably of lower priority on our plate. Disabling Sentry by default in development mode is probably something we'll leave up to users, but we could for example set the environment option in the SDK's inits (for both client and server) to development by looking at import.meta.env.DEV.

Would you be up for contributing such a change?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Package: nuxt Issues related to the Sentry Nuxt SDK
Projects
Status: No status
Development

No branches or pull requests

2 participants