-
Notifications
You must be signed in to change notification settings - Fork 55
Closed
Labels
Description
Describe the bug
After migrating from DataDog SDK V2.X to V3.X, I noticed that certain RUM (Real User Monitoring) data is missing in the DataDog dashboard. Specifically:
• Present: Sessions, Views, and Session Replay recordings are visible.
• Missing: "API requests", "Actions", and "Other resources" requests are not appearing.
Are there additional steps required in V3.X to enable tracking for "API requests", "Actions", and "Other resources"?
Reproduction steps
Below are the old and new configurations for comparison.
Old Code (V2.X)
import { DdSdkReactNative, DdSdkReactNativeConfiguration, PropagatorType } from "expo-datadog";
import { DdRumReactNavigationTracking } from "@datadog/mobile-react-navigation";
import { SessionReplay, SessionReplayConfiguration } from "@datadog/mobile-react-native-session-replay";
const config = new DdSdkReactNativeConfiguration(
"<CLIENT_TOKEN>",
"<ENVIRONMENT>",
"<APPLICATION_ID>",
true, // track User interactions
true, // track XHR Resources
true, // track Errors
);
config.site = "US1";
config.nativeCrashReportEnabled = true;
config.trackBackgroundEvents = true;
config.firstPartyHosts = getFirstPartyHosts(); // Defined elsewhere
config.resourceTracingSamplingRate = 100;
await DdSdkReactNative.initialize(config);
DdRumReactNavigationTracking.startTrackingViews(navigationRef.current);
await DdSdkReactNative.setAttributes({
environment: "env",
bundle_name: Platform.OS === "android" ? "index.android.bundle" : "main.jsbundle",
platform: Platform.OS,
x_device_id: "",
});
const sessionReplayConfig: SessionReplayConfiguration = {
replaySampleRate: 100,
textAndInputPrivacyLevel: TextAndInputPrivacyLevel.MASK_SENSITIVE_INPUTS,
imagePrivacyLevel: ImagePrivacyLevel.MASK_NON_BUNDLED_ONLY,
touchPrivacyLevel: TouchPrivacyLevel.SHOW,
};
await SessionReplay.enable(sessionReplayConfig);
New Code (V3.X):
import { DdSdkReactNative, CoreConfiguration, TrackingConsent, SdkVerbosity } from "expo-datadog";
import { DdRumReactNavigationTracking } from "@datadog/mobile-react-navigation";
import { SessionReplay, SessionReplayConfiguration } from "@datadog/mobile-react-native-session-replay";
const config = new CoreConfiguration(
"<CLIENT_TOKEN>",
"<ENVIRONMENT>",
TrackingConsent.GRANTED,
{
site: "US1",
verbosity: SdkVerbosity.WARN,
rumConfiguration: {
applicationId: "<APPLICATION_ID>",
trackInteractions: true,
trackResources: true,
trackErrors: true,
nativeCrashReportEnabled: true,
trackBackgroundEvents: true,
firstPartyHosts: getFirstPartyHosts(), // Defined elsewhere
resourceTraceSampleRate: 100,
sessionSampleRate: 100,
telemetrySampleRate: 100,
},
logsConfiguration: {
bundleLogsWithRum: true,
bundleLogsWithTraces: true,
},
}
);
await DdSdkReactNative.initialize(config);
DdRumReactNavigationTracking.startTrackingViews(navigationRef.current);
await DdSdkReactNative.addAttributes({
environment: "env",
bundle_name: Platform.OS === "android" ? "index.android.bundle" : "main.jsbundle",
platform: Platform.OS,
x_device_id: "",
});
const sessionReplayConfig: SessionReplayConfiguration = {
replaySampleRate: 100,
textAndInputPrivacyLevel: TextAndInputPrivacyLevel.MASK_SENSITIVE_INPUTS,
imagePrivacyLevel: ImagePrivacyLevel.MASK_NON_BUNDLED_ONLY,
touchPrivacyLevel: TouchPrivacyLevel.SHOW,
};
await SessionReplay.enable(sessionReplayConfig);
DdSdkReactNative.initialize is run in App.ts in useEffect
SDK logs
No response
Expected behavior
No response
Affected SDK versions
3.1.0
Latest working SDK version
2.14.3
Did you confirm if the latest SDK version fixes the bug?
Yes
Integration Methods
Yarn
React Native Version
Expo 54
Package.json Contents
No response
iOS Setup
No response
Android Setup
No response
Device Information
No response
Other relevant information
No response
Reactions are currently unavailable