Skip to content

DdRum.stopView custom context visible in app logs but missing from RUM dashboard #1199

@szarbartosz

Description

@szarbartosz

Describe the bug

I’m seeing a mismatch between what I pass to DdRum.stopView and what eventually appears in Datadog RUM dashboard. In my React Native app, I start/stop views manually and pass performance metrics as custom context on stopView. Local debug logs confirm those values are present right before the SDK call, and stopView resolves successfully. However, when inspecting Datadog network traffic and in the RUM dashboard, those custom attributes are missing.

Reproduction steps

On screen focus, I call DdRum.startView(datadogTraceKey, traceName)
On blur, I collect screen spans and call DdRum.stopView(datadogTraceKey, reducedPendingSpans) Where reducedPendingSpans is built from measured spans, e.g.:

{
"TTP": 40,
"TTI": 200
}

I also added logging around the call and confirmed that DdRum.stopView attempt contains the expected context payload and DdRum.stopView success is logged with no error thrown

SDK logs

No response

Expected behavior

I expect the viewEvents in the Rum dashboard to contain the custom metrics that I'm attaching in the app.

Affected SDK versions

2.14.0

Latest working SDK version

Unknown

Did you confirm if the latest SDK version fixes the bug?

Yes

Integration Methods

Yarn

React Native Version

0.79.6

Package.json Contents

"@datadog/mobile-react-native": "^2.10.0",
"react": "19.0.0",
"react-native": "0.79.6",
"expo": "~53.0.26",

iOS Setup

iPhone X

Android Setup

Samsung Galaxy S25 FE

Device Information

No response

Other relevant information

I am facing this both on iOS and Android - below is the exact object I'm passing to DdRum.stopView as a context parameter:

{"TTP":30,"API":539,"TTI":630}

and this is what I see in the network debugging tool when the rum event is sent:

{
  "date": 1773149492451,
  "application": {
    "id": "xxx",
    "current_locale": "en-US"
  },
  "service": "xxx",
  "version": "xxx",
  "build_version": "xxx",
  "build_id": "xxx",
  "ddtags": "xxx",
  "session": {
    ...
  },
  "source": "react-native",
  "view": {
    "id": "xxx",
    "url": "xxx",
    "name": "HomeScreen",
    "time_spent": 1349947109,
    "is_active": true,
    "is_slow_rendered": false,
    "action": { "count": 16 },
    "error": { "count": 0 },
    "crash": { "count": 0 },
    "long_task": { "count": 0 },
    "frozen_frame": { "count": 0 },
    "slow_frames": [
      { "start": 31183819, "duration": 69002666 },
      { "start": 622848779, "duration": 62235049 },
      { "start": 881191390, "duration": 25483610 },
      { "start": 1222845416, "duration": 20233412 }
    ],
    "resource": { "count": 9 },
    "frustration": { "count": 0 },
    "memory_average": 4.26568e8,
    "memory_max": 4.5244e8,
    "cpu_ticks_count": 100.0,
    "cpu_ticks_per_second": 74.07697630026185,
    "refresh_rate_average": 56.62201481095857,
    "refresh_rate_min": 7.246096549371005,
    "js_refresh_rate": {
      "min": 6.668448318940195,
      "max": 60.190726150700264,
      "average": 46.831450916328066
    }
  },
  "usr": {
    "id": "xxx",
    "name": "xxx",
    "email": "xxx",
    "anonymous_id": "xxx",
    "lbUserId": "xxx"
  },
  "connectivity": { "status": "connected", "interfaces": ["wifi"] },
  "os": { "name": "Android", "version": "16", "version_major": "16" },
  "device": {
    "type": "mobile",
    "name": "Samsung SM-S731B",
    "model": "SM-S731B",
    "brand": "Samsung",
    "architecture": "aarch64",
    "locales": ["en-US"],
    "time_zone": "Europe/Warsaw",
    "battery_level": 1.0,
    "power_saving_mode": false,
    "brightness_level": 0.3
  },
  "_dd": {
    "format_version": 2,
    "session": { "session_precondition": "user_app_launch" },
    "configuration": { "session_sample_rate": 100.0 },
    "document_version": 28,
    "replay_stats": {
      "records_count": 0,
      "segments_count": 0,
      "segments_total_raw_size": 0
    }
  },
  "context": {},
  "type": "view",
  "feature_flags": {}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions