Describe what happened
After upgrading to Expo SDK 54, view events are no longer being sent to Datadog. Action events still work correctly.
Steps to reproduce
- Upgrade to Expo SDK 54.0.0 with the following packages:
"@datadog/mobile-react-native": "^2.13.2"
"@datadog/mobile-react-navigation": "^2.13.2"
"expo-datadog": "^54.0.0"
- Use
expo-datadog for the DatadogProvider, as described in docs
- Set up automated navigation tracking with
DdRumReactNavigationTracking from @datadog/mobile-react-navigation
Expected behavior
View events should be tracked and sent to Datadog alongside action events.
Actual behavior
Only action events are sent, sent via DdRum exposed by expo-datadog. View events are missing.
Root cause analysis
The BoundedBuffer singleton (sdk/DatadogProvider/Buffer/BoundedBuffer.js) appears to be instantiated twice - once via CommonJS and once via ESM. This causes the SDK state to split between two instances.
Timeline:
It looks like expo-datadog may still be forcing CommonJS imports, while @datadog/mobile-react-navigation loads via ESM — resulting in two separate singleton instances.
Environment
- Expo SDK: 54.0.0
- expo-datadog: 54.0.0
- @datadog/mobile-react-native: 2.13.2
- @datadog/mobile-react-navigation: 2.13.2
Describe what happened
After upgrading to Expo SDK 54, view events are no longer being sent to Datadog. Action events still work correctly.
Steps to reproduce
expo-datadogfor the DatadogProvider, as described in docsDdRumReactNavigationTrackingfrom@datadog/mobile-react-navigationExpected behavior
View events should be tracked and sent to Datadog alongside action events.
Actual behavior
Only action events are sent, sent via
DdRumexposed byexpo-datadog. View events are missing.Root cause analysis
The
BoundedBuffersingleton (sdk/DatadogProvider/Buffer/BoundedBuffer.js) appears to be instantiated twice - once via CommonJS and once via ESM. This causes the SDK state to split between two instances.Timeline:
@datadog/mobile-react-nativeaddedgetDefaultExporthelper to support both CJS/ESM ([PR #986]([RUM-11727] [METRO PLUGIN] Support Metro 0.83+ imports dd-sdk-reactnative#986))export defaultinstead ofmodule.exports) ([metro@5d301d7](react/metro@5d301d7))It looks like
expo-datadogmay still be forcing CommonJS imports, while@datadog/mobile-react-navigationloads via ESM — resulting in two separate singleton instances.Environment