Hi.
We have integrated Sentry in our Android app. We have used the sentry.properties with this data:
environment=dev
dsn=https://xxx
release=2.0.0
We would like to set the environment and release variables data from BuildConfig.BUILD_TYPE and BuildConfig.VERSION_NAME.
How can we do it?
Thanks in advance.
You'd have to do it at application launch (in code).
Something like Sentry.getStoredClient().setEnvironment(BuildConfig.BUILD_TYPE); etc: https://github.com/getsentry/sentry-java/blob/4b810150969108429bbb36d28227cb128b986aa0/sentry/src/main/java/io/sentry/SentryClient.java#L292-L294
Most helpful comment
You'd have to do it at application launch (in code).
Something like
Sentry.getStoredClient().setEnvironment(BuildConfig.BUILD_TYPE);etc: https://github.com/getsentry/sentry-java/blob/4b810150969108429bbb36d28227cb128b986aa0/sentry/src/main/java/io/sentry/SentryClient.java#L292-L294