Skip to content

[RUM-9842] Refactored Session ID Event Listener and fixed initFromNative#874

Merged
marco-saia-datadog merged 13 commits into
developfrom
marcosaia/RUM-9842/fix-init-from-native
May 27, 2025
Merged

[RUM-9842] Refactored Session ID Event Listener and fixed initFromNative#874
marco-saia-datadog merged 13 commits into
developfrom
marcosaia/RUM-9842/fix-init-from-native

Conversation

@marco-saia-datadog
Copy link
Copy Markdown
Member

@marco-saia-datadog marco-saia-datadog commented May 13, 2025

What does this PR do?

  • Refactors the Session ID listener logic to use BatchedBridge in old-architecture, and TurboModule Event Emitter in new-architecture to retrieve the RUM Session ID from the native layer;

  • Updates the RN SDK and example project to use RN 0.76.9, to grant compatibility with Xcode 16.3

  • Updates Gitlab CI script for compatibility with RN 0.76.9 update

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests
  • Make sure you discussed the feature or bugfix with the maintaining team in an Issue
  • Make sure each commit and the PR mention the Issue number (cf the CONTRIBUTING doc)
  • If this PR is auto-generated, please make sure also to manually update the code related to the change

@marco-saia-datadog marco-saia-datadog force-pushed the marcosaia/RUM-9842/fix-init-from-native branch 4 times, most recently from 2f28023 to 3887a76 Compare May 14, 2025 11:15
@datadog-datadog-prod-us1
Copy link
Copy Markdown

datadog-datadog-prod-us1 Bot commented May 14, 2025

Datadog Report

Branch report: marcosaia/RUM-9842/fix-init-from-native
Commit report: 330c1ef
Test service: dd-sdk-reactnative

✅ 0 Failed, 661 Passed, 1 Skipped, 3.6s Total Time

@marco-saia-datadog marco-saia-datadog force-pushed the marcosaia/RUM-9842/fix-init-from-native branch 4 times, most recently from 785e646 to a8c2ec6 Compare May 16, 2025 15:25
@marco-saia-datadog marco-saia-datadog marked this pull request as ready for review May 16, 2025 15:45
@marco-saia-datadog marco-saia-datadog requested a review from a team as a code owner May 16, 2025 15:45
@marco-saia-datadog marco-saia-datadog marked this pull request as draft May 16, 2025 17:59
@marco-saia-datadog marco-saia-datadog force-pushed the marcosaia/RUM-9842/fix-init-from-native branch from 3c5eba6 to 2ed588c Compare May 21, 2025 14:59
@marco-saia-datadog marco-saia-datadog force-pushed the marcosaia/RUM-9842/fix-init-from-native branch from 2ed588c to cc4acdb Compare May 26, 2025 04:10
@marco-saia-datadog marco-saia-datadog marked this pull request as ready for review May 26, 2025 04:10
Comment thread packages/core/src/DdSdkReactNative.tsx Outdated
Comment thread packages/core/src/rum/__tests__/DdRum.test.ts
@marco-saia-datadog marco-saia-datadog force-pushed the marcosaia/RUM-9842/fix-init-from-native branch from cc4acdb to 1a8bebc Compare May 26, 2025 05:30
Comment thread packages/core/src/sdk/DatadogInternalBridge/__tests__/DdSdkNativeBridge.test.tsx Outdated
Comment thread packages/core/src/sdk/DatadogInternalBridge/__tests__/DdSdkNativeBridge.test.tsx Outdated
Comment thread packages/core/src/sdk/DatadogInternalBridge/__tests__/DdSdkNativeBridge.test.tsx Outdated
Comment thread packages/core/src/sdk/DatadogInternalBridge/__tests__/DdSdkNativeBridge.test.tsx Outdated
Comment thread packages/core/src/sdk/DatadogInternalBridge/__tests__/DdSdkNativeBridge.test.tsx Outdated
Comment thread example-new-architecture/package.json
Comment thread packages/core/src/DdSdkReactNative.tsx Outdated

// Silence the warning https://github.com/facebook/react-native/issues/11094#issuecomment-263240420
jest.mock('react-native/Libraries/Animated/NativeAnimatedHelper');
// jest.mock('react-native/Libraries/Animated/NativeAnimatedHelper');
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Shouldn't we just delete this line?


// Silence the warning https://github.com/facebook/react-native/issues/11094#issuecomment-263240420
jest.mock('react-native/Libraries/Animated/NativeAnimatedHelper');
// jest.mock('react-native/Libraries/Animated/NativeAnimatedHelper');
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Shouldn't we just delete this line?


// Silence the warning https://github.com/facebook/react-native/issues/11094#issuecomment-263240420
jest.mock('react-native/Libraries/Animated/NativeAnimatedHelper');
// jest.mock('react-native/Libraries/Animated/NativeAnimatedHelper');
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Same as above. Shouldn't we just remove this?

sbarrio
sbarrio previously approved these changes May 26, 2025
Copy link
Copy Markdown
Contributor

@sbarrio sbarrio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Top notch work!

(just left some minor nitpicks)

@marco-saia-datadog marco-saia-datadog force-pushed the marcosaia/RUM-9842/fix-init-from-native branch from 2a4dd4f to 725a005 Compare May 26, 2025 12:31
@marco-saia-datadog marco-saia-datadog force-pushed the marcosaia/RUM-9842/fix-init-from-native branch from 725a005 to 330c1ef Compare May 27, 2025 07:07
@marco-saia-datadog marco-saia-datadog merged commit 8769bb4 into develop May 27, 2025
8 checks passed
@marco-saia-datadog marco-saia-datadog deleted the marcosaia/RUM-9842/fix-init-from-native branch May 27, 2025 15:36
@sbarrio sbarrio mentioned this pull request Jun 2, 2025
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants