-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
@sentry/astro hard-codes DSN during build stage for output:server with node #12412
Comments
Hey @arty-name thanks for writing in! If I understand correctly, the issue seems to be that when we generate the server-side If so, I think we could get away with replacing |
You understood the issue correctly, Lukas! I do believe that the change to |
That's peculiar indeed and I wasn't aware of this at all 😬 I guess we need to try if switching to |
This issue has gone three weeks without activity. In another week, I will close it. But! If you comment or otherwise update it, I will reset the clock, and if you remove the label "A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀 |
I don’t know why "waiting for community" label was added here.
|
Hey @arty-name, passing the DSN directly to our astro integration will be deprecated soon (#14489), instead we encourage users to create runtime specific config files for client and server respectively. |
Thank you for taking time to reply @chargome but I do not pass the DSN to the integration |
@arty-name yep I saw that, but the recommended setup for the server instrumentation is creating a
So here you can get the dsn whichever way you want. |
Has the previously suggested approach of providing the environment variable |
Yes inherently, since providing a |
Thank you for your patience and detailed explanations @chargome! I guess I will close this ticket then. |
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
Steps to Reproduce
astro build
without providing DSNPUBLIC_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.The text was updated successfully, but these errors were encountered: