How can I set the Sentry environment for the browser at runtime? #30039
Unanswered
michaelschufi
asked this question in
Help
Replies: 1 comment 4 replies
-
We actually can't migrate our project to app/ folder because of this :( |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi everyone!
Could anyone maybe help me with the first steps of Sentry.io integration?
I've now configured
sentry.client.config.js
andsentry.server.config.js
but I am having trouble configuring it at runtime.We are deploying our single build to multiple environments, building pages dynamically using Incremental Static Regeneration. However, Sentry seems to ignore the environment variable at runtime (defined in
sentry.client.config.js
). My guess is, thatSentry.init(...)
is only called during the build and never at runtime.Now to my question: How can I set the sentry environment for the browser at runtime?
My current sentry client config:
and in
next.config.js
:How can I set the sentry environment for the browser at runtime if not with
publicRuntimeConfig
?Any help would be greatly appreciated!
Thanks in advance!
Michael
Beta Was this translation helpful? Give feedback.
All reactions