Opt-in breadcrumb timeline capture for severe long tasks

オープン
#7,076 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
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分
マージ済み PR(30日)
106

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

getsentry/sentry-react-native のほかの issue

getsentry/sentry-react-native の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。