Set environment
Closed this issue · 2 comments
Hi! I'm wondering if you have any plans to support an environment
option so I use 'development' and 'production' depending on the action I'm trying to run (eg. test-can-build
(development) vs deploy-production
).
Not really sure of what you are trying to achieve. To my knowledge, Sentry environment is defined when initializing the Sentry SDK:
JavaScript example: https://docs.sentry.io/platforms/javascript/configuration/environments/
Sentry.init({
environment: "production",
});
As mentioned here:
By default the SDK will try to read this value from the SENTRY_ENVIRONMENT environment variable (except for the browser SDK where this is not applicable).
To be honest, I do not see any relationship between the Sentry environment and the CLI.
Ah, @mathieu-bour I see what you mean. I had been trying out several other GitHub actions to fix a bug when deploying to Vercel with a Sentry CLI dev dependency. Some of them had a configuration option to explicitly set the environment. But I was not aware that Sentry could automatically detect the right environment. Thanks!