I’ve managed to add the current git commit hash as an environment variable on the server and pass that as release
to Sentry.init
.
But how should I set this up on the client? In order to get that hash on the client I need to load it via my API, meaning it won’t be available yet when I call Sentry.init
.
Is it possible to set a release when you call Sentry.withScope
and Sentry.captureException
instead? How would I do that?
The only other option I can think of is to make sure the hash is always loaded first and then set it as a global window
variable to ensure it can be used in Sentry.init
, but that seems a bit hacky and prone to failure…