Repository navigation
Conversation
There was a problem hiding this comment.
PR Review — Quality: 3.5 / 5 · Review load: Broad (~1–1.5h)
The manual RUM wrappers, attribute conversion, and documented C++ SDK 0.7.0 limits match the implementation. Merge after the enum parsers case-fold resource methods, action types, and error sources the way the iOS and Android bridges do; DdRum.startResource(key, 'post', url) is recorded as GET.
Customer impact: Medium — Vega apps that call the new manual APIs record RUM events and global attributes. Other platforms are unchanged.
| Concern | |
|---|---|
| Manual RUM event recording, including enum mapping and ignored timestamps | Risky |
Global and view attribute propagation into the C++ SDK and AttributesSingleton |
Risky |
| Packaging, codegen registration, and declaration root | Routine |
Assessment: View, action, resource, error, session, and feature-operation calls reach withRum in bridge order, drop timestamps and fingerprints as the README describes, and resolve without throwing when the module or RUM monitor is missing. Singular attributes unwrap { value }, and AttributesSingleton updates only when the native call does not return false, which the Jest test locks in. Native host tests cover type conversion and the uppercase tokens. They do not cover a lowercase method or action, so the wrong classification above would stay green. The callNative / withRum split is a clear success bit rather than a second attribute store. Kepler's Promise header is not in this repo, so delivery of that boolean across the bridge is inferred from the resolve call and the JavaScript check, not from the marshaller.
Review load — Broad (~1–1.5h): The two boundaries are the RUM call contract across JavaScript and C++, and attribute state shared with AttributesSingleton. Generated specs repeat those signatures. One reviewer can take the wrappers and the native bridge together.
Findings
- [Minor · Correctness] Case-sensitive method and action mapping —
startResource(key, 'post', url)is stored as GET, and lowercase action and error strings become Custom. Comment onpackages/react-native-vega/kepler/turbo-modules/DdRum.cpp.
Sent by Cursor Automation: dd-sdk-react-native reviews
There was a problem hiding this comment.
PR Review — Quality: 5.0 / 5 · Review load: Broad (~1–1.5h)
The ASCII case-fold for actions, resource methods, and error sources is in place, and the host test fails if post, tap, or network fall through to the old defaults. Quality moved to 5.0 because that misclassification was the remaining issue. This is ready to merge as-is.
Customer impact: Medium — Vega apps that call the new manual RUM APIs record events and global attributes. Other platforms are unchanged. Lowercase methods, actions, and error sources now follow the same classification as iOS and Android.
| Concern | |
|---|---|
| Manual RUM event recording, including enum mapping and ignored timestamps | Risky |
Global and view attribute propagation into the C++ SDK and AttributesSingleton |
Risky |
| Packaging, codegen registration, and declaration root | Routine |
Assessment: uppercaseAscii runs before the action, method, and error-source comparisons, so startResource(key, 'post', url) is a POST and tap / network stay Tap and Network. Unknown methods still default to GET. checkCasings locks uppercase, lowercase, and title-case spellings and would throw on the previous exact-match parsers. Resource kinds stay exact lowercase, matching ResourceKind and iOS. BACK remains Custom, as the README already states. Attribute propagation and packaging are unchanged from the previous pass.
Review load — Broad (~1–1.5h): The two boundaries are the RUM call contract across JavaScript and C++, and attribute state shared with AttributesSingleton. One reviewer can take the wrappers and the native bridge together.
This run assessed the delta and revalidated the prior case-mapping finding. That thread is addressed: #1578 (comment)
Sent by Cursor Automation: dd-sdk-react-native reviews
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
DdRum is registered in C++ but omitted from Kepler’s autolink metadata, creating a risk that module discovery silently drops manual RUM calls. Native loader behavior could not be verified.
🤖 Bits Code Review · Commit 699538f
| } | ||
|
|
||
| export const getNativeDdRum = (): DdRum | null => | ||
| TurboModuleRegistry.get<DdRum>('DdRum') ?? null; |
There was a problem hiding this comment.
Declare DdRum in Kepler autolink metadata
The new lookup requests DdRum, but react-native.config.js still advertises only turbomodules: ['DdSdk']. If Kepler resolves modules through the generated name-to-library mapping, it cannot discover DdRum, and callNative silently drops manual RUM calls. Add DdRum to the autolink list alongside its C++ registration. Wrapper tests mock the registry; the native loader implementation was unavailable, so this failure path remains unconfirmed.
React: 👍 useful · 👎 wrong · 😕 unclear · 👀 right, but not acting on it
What each reaction means
- 👍 Useful: correct, and you're fixing it or will.
- 👎 Wrong: the finding is incorrect, for example the bug can't happen or the code was misread.
- 😕 Unclear: you can't tell what it means or why it matters.
- 👀 Right, not acting: correct, but intended, out of scope for this PR, a known risk, or too minor.
🤖 Bits Code Review · Open Bits AI session
buraizu
left a comment
There was a problem hiding this comment.
Left some inline edit suggestions for the doc, but let me know if you have any questions or feedback
| - Event mappers, JavaScript error enrichment, and tracing helpers are not provided | ||
| by this manual wrapper. | ||
|
|
||
| Attribute conversion tests can run on the host with dd-sdk-cpp 0.7.0 and the Vega |
There was a problem hiding this comment.
Suggesting to use code font to mark dd-sdk-cpp
| Attribute conversion tests can run on the host with dd-sdk-cpp 0.7.0 and the Vega | |
| Attribute conversion tests can run on the host with `dd-sdk-cpp` 0.7.0 and the Vega |
| native upload thread. Manual RUM and global attribute APIs are available; SDK | ||
| initialization and automatic instrumentation are added separately. |
There was a problem hiding this comment.
Suggesting a minor clarification
| native upload thread. Manual RUM and global attribute APIs are available; SDK | |
| initialization and automatic instrumentation are added separately. | |
| native upload thread. This package provides manual RUM and global attribute APIs. | |
| It does not include SDK initialization or automatic instrumentation. |
| Import `DdRum` and `DdSdkReactNative` from `@datadog/mobile-react-native-vega`. | ||
| After RUM is initialized, use `DdRum` to start and stop views, record discrete or | ||
| continuous actions, start and stop resources, report errors, update view | ||
| attributes, stop a session, report full app display, and track feature operations. |
There was a problem hiding this comment.
| attributes, stop a session, report full app display, and track feature operations. | |
| attributes, stop a session, report when the app is fully displayed, and track feature operations. |
|
|
||
| `DdSdkReactNative.addAttribute`, `addAttributes`, `removeAttribute`, and | ||
| `removeAttributes` update global RUM attributes and the shared JavaScript context. | ||
| View attributes take precedence over global attributes until removed or the view |
There was a problem hiding this comment.
| View attributes take precedence over global attributes until removed or the view | |
| View attributes take precedence over global attributes until they are removed or the view |
| View attributes take precedence over global attributes until removed or the view | ||
| ends. JSON-compatible values retain their types, including nested objects, | ||
| arrays, numbers, booleans, and null. Singular attribute calls wrap the value for | ||
| the bridge; that wrapper is removed before passing it to the C++ SDK. |
There was a problem hiding this comment.
| the bridge; that wrapper is removed before passing it to the C++ SDK. | |
| the bridge, and the bridge removes that wrapper before passing the value to the C++ SDK. |
| arrays, numbers, booleans, and null. Singular attribute calls wrap the value for | ||
| the bridge; that wrapper is removed before passing it to the C++ SDK. | ||
|
|
||
| Calls resolve safely when the native module or RUM feature is unavailable. They |
There was a problem hiding this comment.
Suggesting a minor clarification, but please confirm this is accurate
| Calls resolve safely when the native module or RUM feature is unavailable. They | |
| `DdRum` and `DdSdkReactNative` calls resolve without error when the native module or RUM feature is unavailable. They |
| - `getCurrentSessionId` resolves to `undefined`; the SDK does not expose a getter. | ||
| - Event timestamps come from the native SDK. Optional `timestampMs` arguments are | ||
| accepted for compatibility but do not override that clock. | ||
| - Custom error fingerprints are accepted but are not supported by the native SDK. |
There was a problem hiding this comment.
| - Custom error fingerprints are accepted but are not supported by the native SDK. | |
| - Custom error fingerprints are accepted but ignored, because the native SDK does not support them. |


What does this PR do?
Adds manual RUM APIs to the Vega package for views, actions, resources, errors, feature operations, session control, and view/global attributes.
The JavaScript wrappers call the C++ SDK through Kepler TurboModules. Native modules resolve on use, attribute values keep their types, and bridge failures do not reject into app code. Native calls use the SDK's event queue to preserve their order.
Motivation
Vega apps need to record RUM events and attach context through JavaScript. This adds the APIs covered by RUM-20336, building on the native foundation in RUM-20035.
Additional Notes
yarn test --runInBand --watchman=false(1,977 tests; one skipped),yarn prepare, andyarn lint --ignore-pattern '**/android/build/**'(no errors; 12 existing warnings).Review checklist (to be filled by reviewers)