React Native RUM appears to only work for iOS devices

Alex Lapa

Posted on
May 10 2021

Hello!

We have raygun user monitoring enabled on our react native app, both iOS and android. However, in raygun dashboard we're only seeing iOS data being captured(devices, os, etc).

While debugging with flipper we can see that RUM payloads are actually being sent to raygun API successfully and also we can see that raygun session appears on RUM "live" tab. However no information appears to be captured and "live" tab is the only evidence that RUM in the android app is even implemented.

Have not yet finished in depth investigation to find a root cause, but would love to hear if there are any known issues.

We're using npm package raygun4reactnative@1.1.0


Deleted User

Raygun

Posted on
May 11 2021

Hi Alex,

Thank you for getting in touch. We have taken a look into what the issue may be and believe it is related to the automatic tracking of views within an Android app.

Raygun's current interpretation of a view for Android apps is an Android activity. Our SDK is built to automatically capture when activities are created and seen by the user.

Some Android apps can use a single activity to hold the entire app. In which case the Raygun client can be enabled after this activity has been created, causing Raygun to not report a view timing event for it. Without this view timing event, the sessions within the Raygun web app cannot be inspected.

The current workaround for this issue is to manually report a view timing event each time the SDK is initialised. Please use the following snippet to manually record a view timing event. This should be placed just after the initialise of the Raygun client.

RaygunClient.sendRUMTimingEvent(RealUserMonitoringTimings.ViewLoaded, 'RaygunStartupView', 1);

This limitation is something for us to address as part of our product roadmap. Please let me know if you are still unable inspect sessions after using the above code snippet and we can investigate further.

Thank you, Mitchell.


Alex Lapa

Posted on
May 13 2021

The workaround worked for us, thank you.


Reply