Skip to content

@sentry/astro hard-codes DSN during build stage for output:server with node #12412

Closed
@arty-name

Description

@arty-name

Is there an existing issue for this?

How do you use Sentry?

Self-hosted/on-premise

Which SDK are you using?

@sentry/astro

SDK Version

8.8.0

Framework Version

4.10.0

Link to Sentry event

No response

SDK Setup

  output: 'server',
  adapter: node({ mode: 'standalone' }),
  integrations: [sentry({ enabled: true })],

Steps to Reproduce

  1. Run astro build without providing DSN
  2. Run PUBLIC_SENTRY_DSN=FAIL astro preview

Or visit the minimal reproduction at https://stackblitz.com/edit/github-5bh1gz?file=package.json

Expected Result

Sentry should log Invalid Sentry Dsn: FAIL

Actual Result

Sentry ignores the provided DSN and does not activate.

Sentry logs this error if you provide PUBLIC_SENTRY_DSN=FAIL during the build stage. Providing a correct DSN at runtime does not fix that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Package: astroIssues related to the Sentry Astro SDK

    Type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions