Sentry-react-native: iOS Native breadcrumbs not being added to javascript events

Created on 24 Feb 2020  路  3Comments  路  Source: getsentry/sentry-react-native

OS:

  • [ ] Windows
  • [x] MacOS
  • [ ] Linux

Platform:

  • [x] iOS
  • [ ] Android

SDK:

  • [x] @sentry/react-native
  • [ ] react-native-sentry

SDK version: 1.3.1
react-native version: 0.61.4

Init Code:

Sentry.init({
  debug: true,
  dsn: 'https://[email protected]/...'
});

I have the following issue:
Our application has a combination of native Objective-C code and react native code. Because of this we track and add breadcrumbs to sentry from both react native and objective-C. With react-native-sentry these breadcrumbs were showing up alongside each other in sentry issues. We recently tried upgrading from react-native-sentry to the new @sentry/react-native and noticed native breadcrumbs are no longer being sent along from javascript events and only react-native breadcrumbs are showing up in issues. It seems like this code https://github.com/getsentry/sentry-cocoa/blob/52f057f31cceb326cb68ca1212ea96c2f0ad53db/Sources/Sentry/SentryNSURLRequest.m#L47 explicitly ignores other event data when json is present. So my question is is there a way to get the old behavior or is this not supported?

Steps to reproduce:

  • Initialize sentry in javascript
  • add a breadcrumb in javascript
  • add a breadcrumb in objective-C [[SentryClient.sharedClient.breadcrumbs] addBreadcrumb: breadcrumb];
  • fire an event from javascript

Actual result:

  • event shows up in dashboard with only javascript breadcrumbs

Expected result:

  • event shows up in dashboard with both javascript and objective-C breadcrumb

Thanks for any help you can give and apologies if I am missing something obvious.

Feature Request @sentrreact-native

Most helpful comment

Yep, we are aware of that.
Thanks for reporting we will try to add support for it.

All 3 comments

Yep, we are aware of that.
Thanks for reporting we will try to add support for it.

@HazAT Great! We are looking forward to seeing JS context in native crashes. It also relates to Android https://github.com/getsentry/sentry-react-native/issues/694

@HazAT Any updates here?

Was this page helpful?
0 / 5 - 0 ratings