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

Difference in creating issues android and ios

Open Damned163 opened this issue 2 years ago • 12 comments

Self-Hosted Version

22.9.0 self-hosted (https://develop.sentry.dev/self-hosted/)

CPU Architecture

x86_64

Steps to Reproduce

Sending via addAttachment in captureMessage on Android and iOS.

ios:

SentrySDK.capture(message: issueId) { scope in
            scope.addAttachment(attachment)
        }

android:

Sentry.captureMessage(issueId) { scope ->
                    scope.addAttachment(
                        Attachment(attachment)
                    )
                }

Expected Result

Behavior like on ios with the creation of different issues

Actual Result

When sending through addAttachment in captureMessage on iOS, a new issue is created each time with the title specified in the message. On Android, they collapse into the first created issue.

android Снимок экрана 2023-10-12 в 18 47 14

ios Снимок экрана 2023-10-12 в 18 47 52 Снимок экрана 2023-10-12 в 18 48 10

Event ID

No response

Damned163 avatar Oct 12 '23 14:10 Damned163

Assigning to @getsentry/support for routing ⏲️

getsantry[bot] avatar Oct 13 '23 19:10 getsantry[bot]

hi @Damned163 thanks for the feedback! We'll investigate and get back to you!

stefanosiano avatar Oct 16 '23 08:10 stefanosiano

hi @Damned163 do you use the same message in captureMessage for those that are collapsed?

romtsn avatar Oct 16 '23 10:10 romtsn

hi @romtsn no, the message is generated every time a new one(modernized UUID is used)

Damned163 avatar Oct 16 '23 10:10 Damned163

In Android we catch the stacktrace at the time Sentry.captureMessage is called. That stacktrace is then used by the backend to merge different messages into one issue (as the stacktrace is the same, as captureMessage is called in the same place) @brustolin @philipphofmann Does iOS capture the stacktrace by default when capturing messages? If so, we have to improve our fingerprinting on Android side. Otherwise we have to decide wether to capture stacktraces by default (or improve fingerprinting anyway)

stefanosiano avatar Oct 18 '23 14:10 stefanosiano

Does iOS capture the stacktrace by default when capturing messages

Yes, but only from the current thread.

brustolin avatar Oct 18 '23 14:10 brustolin

Both iOS and Android should group events captured with captureMessage by stacktrace. @Damned163, please share the event grouping information at the bottom of an event with us. You can retrieve it by clicking on show details. CleanShot 2023-10-20 at 14 12 59

The event grouping information looks like this CleanShot 2023-10-20 at 14 14 24

Then, we know how your issues get grouped. Please also post the Sentry SDK versions you use for Android and iOS.

philipphofmann avatar Oct 20 '23 12:10 philipphofmann

oh since this is an older version of self-hosted, probably uses an outdated grouping config?

romtsn avatar Oct 20 '23 12:10 romtsn

That could also be @romtsn. Updating self-hosted Sentry to the latest version could solve the problem.

philipphofmann avatar Oct 20 '23 12:10 philipphofmann

Link to the Sentry version used: https://github.com/getsentry/sentry/releases/tag/22.9.0

kahest avatar Nov 08 '23 14:11 kahest

@romtsn @philipphofmann updated to the latest version, the problem remained Снимок экрана 2023-11-16 в 14 35 45

Damned163 avatar Nov 16 '23 10:11 Damned163

@Damned163 would you be able to share the grouping information as described above? You can attach it here or send it to [email protected]

kahest avatar Nov 16 '23 13:11 kahest