From d7e1dc7bd14b53d13ba60b8ad189fe74ecd9bb32 Mon Sep 17 00:00:00 2001 From: Alexander Pantiukhov Date: Mon, 23 Nov 2026 12:55:43 +0100 Subject: [PATCH 1/2] docs(attachments): Allow name-only runtime frames in flame graphs The flame graph spec required every native frame to keep instruction_addr. The React Native SDK builds JS hang flame graphs from Hermes sampling profiler traces, and Hermes reports built-in and JSI host function frames with only a name and no address. These are logical runtime frames, not captured machine frames, and SDKs should not invent addresses for them. Relay and the backend already accept frames with only a function. The rule now applies to native frames captured from machine stacks, and frames that a runtime reports without a native address may omit instruction_addr. The spec version moves to 1.8.1. Closes #20938 --- develop-docs/sdk/telemetry/attachments/index.mdx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/develop-docs/sdk/telemetry/attachments/index.mdx b/develop-docs/sdk/telemetry/attachments/index.mdx index 5d50f088d9eb1..1f09f1018d016 100644 --- a/develop-docs/sdk/telemetry/attachments/index.mdx +++ b/develop-docs/sdk/telemetry/attachments/index.mdx @@ -2,7 +2,7 @@ title: Attachments description: File attachments associated with events and traces, including screenshots, minidumps, crash reports, view hierarchies, and flame graphs. spec_id: sdk/telemetry/attachments -spec_version: 1.8.0 +spec_version: 1.8.1 spec_status: stable spec_depends_on: - id: sdk/foundations/transport/envelopes @@ -10,6 +10,9 @@ spec_depends_on: - id: sdk/telemetry/profiles version: ">=2.0.0" spec_changelog: + - version: 1.8.1 + date: 2026-11-23 + summary: Allowed runtime frames without instruction_addr in flame graphs - version: 1.8.0 date: 2026-10-02 summary: Added draft flame graph attachment contract @@ -211,7 +214,7 @@ Consumers **MUST** process the payload according to its `version`. Within versio ##### Flame Graph Frames -Frame entries **MUST** use the same schema as the `profile.frames` entries in a [V2 profile chunk](/sdk/telemetry/profiles/#profile-data). Each entry **MUST** contain at least one of `filename`, `function`, or `instruction_addr`. Native frames **MUST** retain `instruction_addr`, even when already symbolicated. +Frame entries **MUST** use the same schema as the `profile.frames` entries in a [V2 profile chunk](/sdk/telemetry/profiles/#profile-data). Each entry **MUST** contain at least one of `filename`, `function`, or `instruction_addr`. Native frames captured from machine stacks **MUST** retain `instruction_addr`, even when already symbolicated. Frames that a runtime reports without a native address, such as Hermes built-in and host function frames, **MAY** omit `instruction_addr` and contain only `function`. Producers **SHOULD** deduplicate frames using their complete frame data, including addressing mode and binary association. The same frame index **MAY** occur at multiple tree positions, including recursive calls. The frame table has no stack ordering. From 8c91088699e2bddc6f66124a119768ad880b8177 Mon Sep 17 00:00:00 2001 From: "sentry-junior[bot]" <264270552+sentry-junior[bot]@users.noreply.github.com> Date: Mon, 23 Nov 2026 12:11:38 +0000 Subject: [PATCH 2/2] docs(attachments): Tie flame graph address rule to native platforms Match Relay's validation: frames with a native platform must keep instruction_addr, and name-only runtime frames must not use one. Co-Authored-By: Aleksandr Pantiukhov --- develop-docs/sdk/telemetry/attachments/index.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/develop-docs/sdk/telemetry/attachments/index.mdx b/develop-docs/sdk/telemetry/attachments/index.mdx index 1f09f1018d016..44a9963c24334 100644 --- a/develop-docs/sdk/telemetry/attachments/index.mdx +++ b/develop-docs/sdk/telemetry/attachments/index.mdx @@ -214,7 +214,7 @@ Consumers **MUST** process the payload according to its `version`. Within versio ##### Flame Graph Frames -Frame entries **MUST** use the same schema as the `profile.frames` entries in a [V2 profile chunk](/sdk/telemetry/profiles/#profile-data). Each entry **MUST** contain at least one of `filename`, `function`, or `instruction_addr`. Native frames captured from machine stacks **MUST** retain `instruction_addr`, even when already symbolicated. Frames that a runtime reports without a native address, such as Hermes built-in and host function frames, **MAY** omit `instruction_addr` and contain only `function`. +Frame entries **MUST** use the same schema as the `profile.frames` entries in a [V2 profile chunk](/sdk/telemetry/profiles/#profile-data). Each entry **MUST** contain at least one of `filename`, `function`, or `instruction_addr`. Frames with a native platform (`cocoa`, `objc`, `native`, or `c`), taken from the frame's `platform` or, when absent, the payload's `platform`, **MUST** retain `instruction_addr`, even when already symbolicated. Frames that a runtime reports without a native address, such as Hermes built-in and host function frames, **MAY** omit `instruction_addr`. Such frames **MUST NOT** use a native platform. Producers **SHOULD** deduplicate frames using their complete frame data, including addressing mode and binary association. The same frame index **MAY** occur at multiple tree positions, including recursive calls. The frame table has no stack ordering.