Sentry-react-native: Enabling Sentry Health in a React Native project

Created on 20 May 2020  路  8Comments  路  Source: getsentry/sentry-react-native

Documentation on how to enable the new release health feature with React Native is missing.
There is a clear guide for the native platforms: https://docs.sentry.io/workflow/releases/health

I can see that the SDK versions for Android and iOS on versions above 1.3.8 of react-native-sentry should allow us to enable support, but are not configured by default in the react-naitve-sentry package itself.

Can we add some documentation on how to enable that within a React Native project?

Platform:

  • [x] iOS
  • [x] Android

SDK:

  • [x] @sentry/react-native (>= 1.0.0)
  • [ ] react-native-sentry (<= 0.43.2)

SDK version: 0.0.0

react-native version: 0.62.2

Are you using Expo?

  • [ ] Yes
  • [X] No

Are you using sentry.io or on-premise?

  • [X] sentry.io (SaaS)
  • [ ] on-premise
Feature Request

Most helpful comment

We will release version 1.4.0 which adds support for that.
We will also update the documentation to reflect that.

All 8 comments

To benefit from the health data you must use at least version 2.1.0 of the Android SDK and 5.0.0 of the Cocoa SDK. While Android SDK is 2.1.x, iOS Sentry is currently 4.4.0 and only updated on master branch, so iOS shouldn't work.

Waiting for this as well!

To benefit from the health data you must use at least version 2.1.0 of the Android SDK and 5.0.0 of the Cocoa SDK. While Android SDK is 2.1.x, iOS Sentry is currently 4.4.0 and only updated on master branch, so iOS shouldn't work.

Maybe I'm wrong but the Pod spec from the latest version (1.3.9) is using Sentry 5.0.2 (https://github.com/getsentry/sentry-react-native/blob/1.3.9/RNSentry.podspec#L19), shouldn't that be enough for using the feature?

To benefit from the health data you must use at least version 2.1.0 of the Android SDK and 5.0.0 of the Cocoa SDK. While Android SDK is 2.1.x, iOS Sentry is currently 4.4.0 and only updated on master branch, so iOS shouldn't work.

Maybe I'm wrong but the Pod spec from the latest version (1.3.9) is using Sentry 5.0.2 (https://github.com/getsentry/sentry-react-native/blob/1.3.9/RNSentry.podspec#L19), shouldn't that be enough for using the feature?

@fluiddot It seems so, but some app level native configuration for session tracking is needed for this to work as stated in the native guide. I will try it once I have some time on my hands, but not an expert at that.

We will release version 1.4.0 which adds support for that.
We will also update the documentation to reflect that.

We've release 1.4.0.
Could you please try passing enableAutoSessionTracking: true to and give it a shot? Thanks

I'll give it a shot as soon as possible. Thanks @bruno-garcia and @HazAT!

The session tracking aspect of 1.4.0 seems to be working, however I ran into a separate issue: https://github.com/getsentry/sentry-react-native/issues/882

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kriptonhaz picture kriptonhaz  路  3Comments

poocart picture poocart  路  3Comments

juhaelee picture juhaelee  路  3Comments

hecontreraso picture hecontreraso  路  3Comments

dht picture dht  路  3Comments