Opt-in breadcrumb timeline capture for severe long tasks

未關閉
#7,076 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
5/5
預估耗時
一週以上
新手友好度
18/100
Issue 類型
功能
描述清晰度
基本清楚
活躍度
活躍
技術堆疊
javascript, react-native, typescript

研究方向

This is a design discussion, not a scoped change: it opens with two unresolved questions (reliability of performance.timeOrigin on RN 0.82+ New Architecture, and whether the default maxBreadcrumbs of 100 is enough) that need an answer before any code is written. Start by reading how the existing long-task detection emits events and how createReduxEnhancer and the fetch/xhr/navigation integrations attach breadcrumbs, then read the related span issue and getsentry/sentry-react-native#6185 for context. Done here means a written proposal — threshold option, per-session cap, screen-based fingerprint, and how performance.timeOrigin + entry.startTime maps to the breadcrumb window — agreed with the team before implementation.

由索引模型根據 Issue 內容生成。

描述

Feature React-Native

A long task tells you that the JS thread was blocked, but not what led to it. Customers who need the Redux action / network / navigation timeline around a long task keep their own ring-buffer instrumentation next to the SDK. The SDK already records most of that timeline as breadcrumbs (createReduxEnhancer actions, fetch/xhr, navigation, touches).

Proposal (team discussion):

  • Above a second threshold (e.g. captureThresholdMs: 1000), emit a warning-level event that carries the breadcrumbs from shortly before the task through its end. Events already carry breadcrumbs, view_names and the replay link; log attributes are flat and fit a breadcrumb array poorly.
  • Off by default, with a per-session cap.
  • Fingerprint by screen, since there is no stack.
  • Match the window by converting performance.timeOrigin + entry.startTime to wall-clock time.

Open questions: whether performance.timeOrigin is reliable on RN 0.82+ New Architecture; whether the default maxBreadcrumbs (100) keeps enough history in apps that dispatch many Redux actions. Breadcrumbs do not cover component renders; the ui.long_task span issue covers that side.

Raised by Chris Aigner from customer feedback (CRO-917). Related: getsentry/sentry-react-native#6185.

Action taken by Junior.

主要語言
TypeScript
星號
1.8k
分支
371
平均合併
22 小時 3 分鐘
30 天內合併 PR
106

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

getsentry/sentry-react-native 的其他 Issue

查看 getsentry/sentry-react-native 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。