Skip to content

Commit a924207

Browse files
authored
fix: enable session tracking by default on sample (getsentry/sentry-android#538)
1 parent 1e0c9fc commit a924207

2 files changed

Lines changed: 7 additions & 5 deletions

File tree

sentry-samples/sentry-samples-android/build.gradle.kts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ android {
6666
buildTypes {
6767
getByName("debug") {
6868
manifestPlaceholders = mapOf(
69-
"sentryDebug" to true
69+
"sentryDebug" to true,
70+
"sentryEnvironment" to "debug"
7071
)
7172
}
7273
getByName("release") {
@@ -76,7 +77,8 @@ android {
7677
isShrinkResources = true
7778

7879
manifestPlaceholders = mapOf(
79-
"sentryDebug" to false
80+
"sentryDebug" to false,
81+
"sentryEnvironment" to "release"
8082
)
8183
}
8284
}

sentry-samples/sentry-samples-android/src/main/AndroidManifest.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,13 @@
5757
<!-- <meta-data android:name="io.sentry.ndk.enable" android:value="false" />-->
5858

5959
<!-- how to set a custom release-->
60-
<!-- <meta-data android:name="io.sentry.release" android:value="io.sentry.sample@1.0.0+10001" />-->
60+
<!-- <meta-data android:name="io.sentry.release" android:value="io.sentry.samples.android@1.1.0+2" />-->
6161

6262
<!-- how to disable automatic session tracking-->
63-
<meta-data android:name="io.sentry.session-tracking.enable" android:value="false" />
63+
<!-- <meta-data android:name="io.sentry.session-tracking.enable" android:value="false" />-->
6464

6565
<!-- how to set an environment-->
66-
<!-- <meta-data android:name="io.sentry.environment" android:value="debug" />-->
66+
<meta-data android:name="io.sentry.environment" android:value="${sentryEnvironment}" />
6767

6868
<!-- how to change the session tracking interval-->
6969
<meta-data android:name="io.sentry.session-tracking.timeout-interval-millis" android:value="10000" />

0 commit comments

Comments
 (0)