-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hybrid App [iOS with RN] : React Native screens RUM data is not sent to DataDog . Issue in iOS . Works for Android . Could not see RUM sent message in logs. #682
Comments
Hello @kesavarao-EB! I see that you are initialising the SDK multiple times. That is not the intended usage. The Alternatively you can remove the initialization and provider logic from the React Native side, and only keep the native initialization. The side in which you choose to initialize the SDK is the one that you want auto-instrumentation to be activated on. Please take a look at our documentation for Monitoring Hybrid React Native Applications. In particular:
|
But in the official documentation %3B)you have used both DatadogProvider.initialize and ,Even in the example repo , you have used bothIn our system, DataDog RUM is already defined in iOS repo and it will working. We have react-native screens in seperate repo. But Native is using react native screens from react-native repo. In this usecase, Please let us know if you want us to intiliaze with "fake_value" in the react-native repo ? Currently we are blocked , can you help us in right steps to implement for our usecase ? |
@marco-saia-datadog After adding only DataDogProvider in the index.js index.js
getDatadogConfig function:
Even added DdRum.startView("===Custom view renderItem ====") Actual OUTPUT :In simulator logs, i can see the
Issue - Dont see "SENT Successful message". In datadog RUM performance summary we are not any data flowing.In Simulator i can see the warning message. Not sure if this is causing the issue of not sending the data Can i get any support here ? |
Hello @kesavarao-EB, did you see my comment on #683? It might be blocking this issue. |
I have updated the example project with the latest version of the SDK. Feel free to check it out on this PR, that will soon be merged: DataDog/dd-sdk-reactnative-examples#34. Although there are some improvements to make on the project, I could at least verify that it works correctly with the current setup. The main changes are related to the configuration files: Podfile (using ruby v3.2.2): - pod 'DatadogSDKObjc', '~> 1.15.0'
+ pod 'DatadogSDKObjc', '~> 2.13.0' In build.gradle: - implementation "com.datadoghq:dd-sdk-android"
+ implementation "com.datadoghq:dd-sdk-android-rum:2.11.0"
+ implementation "com.datadoghq:dd-sdk-android-logs:2.11.0"
+ implementation "com.datadoghq:dd-sdk-android-trace:2.11.0"
+ implementation "com.datadoghq:dd-sdk-android-webview:2.11.0"
+ implementation "com.datadoghq:dd-sdk-android-okhttp:2.11.0" Can you please verify your setup and let me know how it differs from the example project? Once I understand how your project structure looks like, I will be able to help you set it up correctly :) |
@kesavarao-EB We will also notify you as soon as the documentation changes have been made! |
Still the same issue as #683 |
Describe the bug
We have native apps (iOS and android) and DataDog RUM already been instrumented and working fine. We recently developed some screens using react native (FYI, React native code resides in a separate repo).
[ios app with RN] -Native APP is the main and some of pages are based out react-native.
GOAL - Instrument DataDog RUM for react native screens or project.
We followed this DOC and also example repo (ios-with-rn)
ISSUE - [in iOS] RUM data of react native screens are NOT sent to Datadog for iOS. Could not find under Digital Experience -> RUM -> Performance summary .
NOTE - Same code working in "ANDROID", we can see the custom view name being displayed in Datadog RUM under Android application.
below is my DataDogRUM initialisation code in both iOS and react-native repo
Ios :
In AppDelegate.swift,
`.run { _ in
In react-native app repo :
index.tsx
}`
`
Reproduction steps
Initialize RUM as above
Open project in Xcode
Run the app in simulator
Navigate to native screens and react native screens
Go to Datadog RUM dashboard and looks for view names of react native screens.
SDK logs
======Datadog initialized============
[DATADOG SDK] 🐶 → 18:54:06.753 NTP time synchronization completed.
🔥 Datadog SDK usage error: The 'main' instance of SDK is already initialized.
DATADOG: Starting RUM Resource #1719669770474/GET GET: https://codepush.appcenter.ms/v0.1/public/codepush/update_check?deployment_key=PL&app_version=9.82.0&package_hash=b6fa7ea2f54828629&label=v250&client_unique_id=2E3B58C5-BC0B-****-8CDD-00000000000000
DATADOG: Stopping RUM Resource #1719669770474/GET status:200
Not Getting
Batch *********** [4345 bytes] (RUM Request) sent successfully.
Which we are seeing for Android
Expected behavior
No response
Affected SDK versions
"@datadog/mobile-react-native": "^2.3.5", "@datadog/mobile-react-native-navigation": "^2.3.5", "@datadog/mobile-react-navigation": "^2.3.5", dd-sdk-ios : 2.5.0
Latest working SDK version
mobile-react-navigation": "^2.3.5", dd-sdk-ios : 2.5.0
Did you confirm if the latest SDK version fixes the bug?
Yes
Integration Methods
NPM
React Native Version
0.73.4
Package.json Contents
No response
iOS Setup
No response
Android Setup
No response
Device Information
No response
Other relevant information
No response
The text was updated successfully, but these errors were encountered: