Environments
Learn how to configure your SDK to tell Sentry about your environments.
Sentry automatically creates environments when it receives an event with the environment tag. Environments are case-sensitive. The environment name can't contain newlines, spaces or forward slashes, can't be the string "None", or exceed 64 characters. You can't delete environments, but you can hide them.
The Electron SDK automatically sets the environment
to development
or production
depending on whether the application is packaged.
You can override this default for other environments:
Copied
import * as Sentry from "@sentry/electron/main";
Sentry.init({
environment: "test",
});
Environments help you better filter issues, releases, and user feedback in the Issue Details page of sentry.io, which you learn more about in our documentation that covers using environments.
Help improve this content
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").