[RUM 9145] Refactor RUM Action Tracking#941
Conversation
marco-saia-datadog
left a comment
There was a problem hiding this comment.
Top-notch work! 👏
I would wait for the final round of testing before merging. As an alternative we could set "private": true in package.json until we're confident rolling it out.
WDYT?
marco-saia-datadog
left a comment
There was a problem hiding this comment.
I forgot to mention it before, but we should add a README.md with a description of the new package and setup instructions.
c74fc3a to
588c663
Compare
buraizu
left a comment
There was a problem hiding this comment.
Requesting some minor edits. In addition to these, could you please add the following line at the end of the doc, after the last code example (with a blank line between the code example and the link)?
[1]: https://www.npmjs.com/package/@datadog/mobile-react-native
This makes translation of the doc easier, as mentioned in our style guide
7699285 to
8f01b30
Compare
marco-saia-datadog
left a comment
There was a problem hiding this comment.
IMPORTANT
Testing on iOS old architecture (RN 0.65) I have encountered a critical runtime error because of sendTelemetryLog being undefined.
The reason is the missing RCT macro on DdSdk.mm.
You should add this:
RCT_REMAP_METHOD(sendTelemetryLog, withMessage:(NSString*)message
withAttributes: (NSDictionary *)attributes
withConfig:(NSDictionary *)config
withResolver:(RCTPromiseResolveBlock)resolve
withRejecter:(RCTPromiseRejectBlock)reject)
{
[self sendTelemetryLog:message attributes:attributes config:config resolve:resolve reject:reject];
}8f01b30 to
657f59f
Compare
657f59f to
ed7c9f4
Compare
- Adds global signaling plugin has been enabled on the users' codebase - Setup base architecture for plugin
…action-tracking-support [RUM 9983] Add RUM action tracking support to babel plugin
…bel-plugin-into-sdk [RUM 9985] Integrate babel plugin into core SDK
ed7c9f4 to
fa95a01
Compare
What does this PR do?
Introduces a new method for automatic RUM action tracking using a Babel plugin. This plugin scans the user’s codebase for specific actions and wraps them with our custom logic.
This serves as a direct replacement for our current approach, which relies on wrapping React internals. That legacy method is no longer compatible with the latest versions of Expo.
The new system supports a dual-mode setup: if the Babel plugin is not included, the existing approach remains active. However, once the plugin is added, it takes full precedence and the legacy method is disabled. This setup allows users to adopt the new system gradually and gives us the opportunity to evaluate it performs before deprecating the original implementation.
Motivation
Provide a reliable and consistent way to automatically track RUM actions across all types of React Native applications—whether built with Expo or React Native CLI. The goal is to ensure compatibility across all versions of React Native and maintain consistent behavior regardless of whether the app uses the New Architecture or the Old Architecture.
Review checklist (to be filled by reviewers)