Sentry: Breadcrumbs messages are overridden by custom event message intermittently

Created on 20 May 2020  路  7Comments  路  Source: getsentry/sentry

_Platform:_

  • [x] Android -> If yes, which Device API - 29 - compileSdkVersion - 29 - targetSdkVersion - 29
  • [ ] Java -> If yes, which Java (and sourceCompatibility/targetCompatibility) version?
  • [ ] Kotlin -> If yes, which Kotlin (and jvmTarget) version?
  • [ ] NDK -> If yes, which NDK/CMake version?
  • [ ] React-Native -> If yes, which version?

_IDE:_

  • [x] Android Studio -> If yes, which version? Android Studio 3.5.3 (Build #AI-191.8026.42.35.6010548)
  • [ ] IntelliJ -> If yes, which version?
  • [ ] Other -> If yes, which one?

_Build system:_

  • [x] Gradle -> If yes, which version? 6.4.1
  • [ ] Buck -> If yes, which version?
  • [ ] Bazel -> If yes, which version?
  • [ ] Other -> If yes, which one?

_Android Gradle Plugin:_

  • [x] Yes -> If yes, which version? 3.5.3
  • [ ] No

_Sentry Android Gradle Plugin:_

  • [ ] Yes -> If yes, which version?
  • [x] No

_Proguard/R8:_

  • [ ] Enabled
  • [x] Disabled

_sentry-android installed with:_

  • [ ] JCenter
  • [ ] Bintray
  • [x] Maven Central
  • [ ] Manually

The version of sentry-android:
2.1.2


I have the following issue:

We append custom messages to our error events to get some additional context on crashes and errors. However, the message in our breadcrumbs are overridden by our custom message for the event. For example,

This is our custom message for the crash:

image

The same message seems to be repeated in all our custom breadcrumbs in some crashes.

image

But in others, it actually shows the breadcrumbs that are intended. There doesn't not seem to be any pattern to this. At least from our point of view.

image

Checked to make sure that we only attach the info in the event message and we don't mutate the breadcrumbs anywhere. Pretty confident about that. Also, we attach the additional info in the message property of events in the beforeSend callback.

image

Not sure why this might be flaky. Could you please look into this issue? Also let me know if you need any info. Thanks.

UI Bug

All 7 comments

hey @narenkmanoharan thanks for raising this.

I quite don't understand the problem here.

Are we talking about event.message or breadcrumb.message?

If I got this right, you meant that you set an event.message (using beforeSend callback) and in the end, they ended up at breadcrumb.message replacing the message of a few breadcrumbs?

That's odd, I don't see how this can be possible but will look into it.

Do you use BeforeBreadcrumbCallback as well?

Can you just double-check my understanding of the problem and also share your code snippet about how you add breadcrumbs? thanks a lot :)

btw can you also share the raw message that you try to attach in the event.message? an example would be fine, just wondering if that message is somehow breaking the JSON parsing.

if you use sentry.io, a link to the issue would be also helpful, so I can analyze its payload :)

Hi @marandaneto,

Thanks for you prompt response. Sorry about getting back so late.

So I'm trying to attach info in the event.message but that somehow seems to be affecting the breadcrumb.message randomly where the all breadcrumb messages associated with the event contain the same raw message that I'm attaching in the event.message field. Here are some example events from sentry.io.

Here's where you can see the issue:

https://sentry.io/organizations/wealthfront/issues/1648744616/events/13197913dc7843a68eab8665324ddd95/?project=1774880

This is where it works as intended.

https://sentry.io/organizations/wealthfront/issues/1675291300/events/7b4c99957ac54d5db03941a91fc323fc/?project=1774880

Hopefully, thats helpful. Let me know if you need any additional data. Thanks.

hey @narenkmanoharan thanks for getting back to me and reporting this.

indeed, I think it's a UI issue as looking into the raw JSONs and its contents, it looks good.

I'll pass this down to the team.

cc @priscilawebdev

Seems to work now

Thanks for fixing this! :)

Was this page helpful?
0 / 5 - 0 ratings