getsentry / getsentry/sentry-react-native

Populate trace_ids in mobile replay events to enable searching replays by trace ID

Đang mở
#6,232 1 bình luận 0 reaction 1 người được giao Được giao cho @alwx Xem trên GitHub
Feature React-Native Replays State: Blocked
Ngôn ngữ chính
TypeScript
Star
1.8k
Fork
366
Merge trung bình
1 ngày 6 giờ
Pull request đã merge (30 ngày)
94

Mô tả

## Problem

When searching for replays by trace ID in Sentry's Explore UI, mobile replays from React Native are not discoverable. While web replay (via JS SDK) collects `trace_ids`, the mobile replay integration does not.

## Solution

The `mobileReplayIntegration` should collect trace IDs when transactions are captured and pass them to the native replay system.

### Reference implementations
- JS (web replay): https://github.com/getsentry/sentry-javascript/blob/30eb68fff5077211c30c61ba74625e66ab514870/packages/replay-internal/src/coreHandlers/handleAfterSendEvent.ts#L34-L43
- Java (Android native): https://github.com/getsentry/sentry-java/pull/5473

### Key points
- Collect trace IDs when transactions are successfully captured during replay recording
- Limit to max 100 trace IDs per segment (matching JS SDK)
- Need a bridge mechanism to pass trace IDs from JS transactions to native replay
- Android native SDK (sentry-java) now supports `registerTraceId()` — need similar support in iOS (sentry-cocoa)

### Dependencies
- sentry-cocoa needs to implement `trace_ids` support first (or in parallel)

Action taken on behalf of Roman Zavarnitsyn.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.