Skip to content

Profiling and Mobile Vitals (insights) not working on latest version of react native sdk #4788

@ric-sanchez-salesloft

Description

@ric-sanchez-salesloft

What React Native libraries do you use?

React Native without Frameworks, React Navigation, Hermes, RN New Architecture

Are you using sentry.io or on-premise?

sentry.io (SaS)

@sentry/react-native SDK Version

6.10.0

How does your development environment look like?

System:
  OS: macOS 15.4
  CPU: (12) arm64 Apple M2 Pro
  Memory: 273.41 MB / 32.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 20.17.0
    path: ~/.asdf/installs/nodejs/20.17.0/bin/node
  Yarn: Not Found
  npm:
    version: 11.3.0
    path: ~/.asdf/plugins/nodejs/shims/npm
  Watchman:
    version: 2025.03.10.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.15.2
    path: /Users/ricardosanchez/.asdf/shims/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 24.2
      - iOS 18.2
      - macOS 15.2
      - tvOS 18.2
      - visionOS 2.2
      - watchOS 11.2
  Android SDK:
    API Levels:
      - "28"
      - "31"
      - "33"
      - "34"
      - "35"
    Build Tools:
      - 30.0.3
      - 31.0.0
      - 33.0.0
      - 33.0.1
      - 33.0.2
      - 34.0.0
      - 34.0.0
      - 34.0.0
      - 34.0.0
      - 35.0.0
      - 35.0.0
    System Images:
      - android-33 | Google APIs ARM 64 v8a
      - android-33 | Google Play ARM 64 v8a
      - android-34 | Google APIs ARM 64 v8a
      - android-35 | Google Play ARM 64 v8a
    Android NDK: Not Found
IDEs:
  Android Studio: 2024.3 AI-243.22562.218.2431.13114758
  Xcode:
    version: 16.2/16C5032a
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.14
    path: /opt/homebrew/opt/openjdk@17/bin/javac
  Ruby:
    version: 2.7.6
    path: /Users/ricardosanchez/.asdf/shims/ruby
npmPackages:
  "@react-native-community/cli":
    installed: 15.1.3
    wanted: ^15.0.0
  react:
    installed: 18.3.1
    wanted: 18.3.1
  react-native:
    installed: 0.76.7
    wanted: ^0.76.0
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: true
  newArchEnabled: true

info React Native v0.79.1 is now available (your project is running on v0.76.7).
info Changelog: https://github.com/facebook/react-native/releases/tag/v0.79.1
info Diff: https://react-native-community.github.io/upgrade-helper/?from=0.76.7&to=0.79.1
info For more info, check out "https://reactnative.dev/docs/upgrading?os=macos".




Sentry.init()

  const navigationIntegration = Sentry.reactNavigationIntegration({
    enableTimeToInitialDisplay: true,
  })

  // Sentry integrations
  const mobileReplayIntegration = Sentry.mobileReplayIntegration({
    maskAllText: false,
  })

    Sentry.init({
      dsn: currentConfig.sentry.dsn,
      environment: currentEnvironment,
      tracesSampleRate: 1.0,
      profilesSampleRate: 1.0,
      replaysSessionSampleRate: 1.0,
      replaysOnErrorSampleRate: 1.0,
      integrations: [
        Sentry.reactNativeTracingIntegration(),
        mobileReplayIntegration,
        navigationIntegration,
      ],
    })

Steps to Reproduce

  1. Add sentry init as mentioned above
  2. add the following to '@react-navigation/native' 's <NaviogationContainer>:
  • navigationIntegration.registerNavigationContainer(NAVIGATION_REF)
  1. Install the app on physical devices
  2. Replays and general errors are working as expected
  3. Expects vitals and profiling info on Sentry Dashboard

Expected Result

Mobile vitals should be send to Sentry Dashboard, as for testing we are setting the tracesSampleRate and profilesSampleRate, replaysSessionSampleRate, and replaysOnErrorSampleRate to 1.0.

Actual Result

  • Only Replays and general error are being reportes

Metadata

Metadata

Assignees

No fields configured for issues without a type.

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions