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.

AndroidManifest.xml
Copied
<!-- https://developer.android.com/studio/build/manifest-build-variables -->
<meta-data android:name="io.sentry.environment" android:value="${sentryEnvironment}" />

Or, if you are manually instrumenting Sentry:

Copied
import io.sentry.android.core.SentryAndroid;

SentryAndroid.init(this, options -> {
  options.setEnvironment("production");
});

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.