sentry-java icon indicating copy to clipboard operation
sentry-java copied to clipboard

Auto release detection not working

Open rodolfoBee opened this issue 8 months ago • 5 comments

Integration

sentry-android

Build System

Gradle

AGP Version

5.1.0

Proguard

Enabled

Version

8.1.0 and 7.13.0

Steps to Reproduce

  1. Configure the Android SDK as:
plugins {
id 'io.sentry.android.gradle' version '5.1.0'
}
...
sentry{
includeProguardMapping.set(true)
autoUploadProguardMapping.set(true)
tracingInstrumentation.enabled.set(false)

in AndroidManifest.xml:

<application>
<meta-data
android:name="io.sentry.dsn"
android:value="_MY_DSN_" />
</application>

Run the app

Expected Result

All events sent by the SDK have the default release tag associated with them. This release is based on the app/build.gradle configuration {applicationId}@{versionName}+{versionCode}.

Actual Result

Some events are missing release tag. The issue was originally reported in this internal ticket where events are not filtered by the release filter.

The project contains multiple grade files which might be root cause.

rodolfoBee avatar Mar 04 '25 14:03 rodolfoBee

It's worth mentionning that the event.release is null, as well as the context.app.appversion/build, so it seems our backfilling logic is not working as intented.

markushi avatar Mar 04 '25 14:03 markushi

@markushi @stefanosiano do we have an update on this issue?

rodolfoBee avatar Mar 07 '25 09:03 rodolfoBee

@rodolfoBee could you verify that the scope persistence isn't disabled via options? By default it's turned on, but it can be disabled via options.setEnableScopePersistence(false), which would have the side effect of not seeing any releases for ANR events.

markushi avatar Mar 10 '25 06:03 markushi

can this be an instance of this? https://github.com/getsentry/sentry-java/issues/3287

romtsn avatar Mar 10 '25 11:03 romtsn

The SDK is initialised using the manifest with the DSN only, setEnableScopePersistence is not set to false there.

rodolfoBee avatar Mar 13 '25 06:03 rodolfoBee