iOS Sentry grouping

Hi,

I’m using the latest Cocoa Sdk, and having trouble at grouping Sentries.
My use case:

  • Sending an event with a message that contains a timestamp.
  • How I send the event:
    [[SentryClient sharedClient] snapshotStacktrace:^{
    SentryEvent *event = [[SentryEvent alloc]initWithLevel:kSentrySeverityError];
    [event setMessage:message];
    [event setUser:[[SentryUser alloc] initWithUserId:userId]]; // user email
    [[SentryClient sharedClient] appendStacktraceToEvent:event];
    [[SentryClient sharedClient] sendEvent:event withCompletionHandler:NULL];
    }];
    Note: the above shows no stacktrace, but threads on my issue…
  • Expected result:
    The groupeded issue with the two events attached.
  • Actual result:
    Two different issues, probably becouse the grouping was by message content.
    The thread on both issues is the same, including the tags.

I’ve tried multiple things and still can’t get it to work, even when using
[event setFingerprint:fingerprintArr];
with a common fingerprint didn’t made the group to work.

Can you please assist?

Hey, I can’t reproduce this I just tried it and it works

        let event = Event(level: .debug)
        event.message = "demo test: \(Date())"
        event.fingerprint = ["a"]
        Client.shared?.send(event: event, completion: nil)

All of these events get grouped together.

Can you post a link to the event on sentry.io so I can investigate what’s going on?

Hi @HazAT,

Thank you for your help.

  1. The following events were sent from iOS, using snapshotStacktrace & appendStacktraceToEvent:event. They weren’t grouped.
    https://sentry.io/augury/auguscope-ios_staging/issues/886683768/events/46056576257/
    https://sentry.io/augury/auguscope-ios_staging/issues/886685724/events/46056704756/
  2. When using the appendStackTrace, Sentry shows the stack trace as Thread rather under a StackTrace on the dashboard.
    Moreover, it always adds a tag of crashed=yes.
    Why is that and how can we control it?
  3. After simplifying the fingerprint, it’s working as expected, though we would still like to know what’s the problem with (1).

Thanks in advance.

So, grouping works of the message the event has, if the message contains a timestamp that changes, events are usually not grouped. In that case you need to use fingerprinting.

If you would not set a message it should be grouped by just the stack trace.