Skip to content

Automatically set environment to development in Nuxt dev mode #15147

@maximepvrt

Description

@maximepvrt

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".

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions