Rename TurboModule attributes and span op to match Sentry Conventions

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

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

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

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
react-native, typescript

調査の方向性

Read src/js/integrations/turboModuleContext.ts and src/js/integrations/turboModuleContextFlush.ts, then inspect the tests and public docs that cover TurboModule spans and attributes. First write the requested design sketch covering child-span count, payload size, and maxTopModulesPerSpan, then determine the release approach for the breaking changes. Done means the acceptance criteria pass and a Changelog entry and docs updates are included.

索引モデルが issue の本文から書いたものです。

説明

Improvement React-Native

getsentry/sentry-conventions#564 registered the TurboModule (native module) attributes under react_native.* and deprecated the names the SDK sends today. The SDK still sends the old names. The integration is on by default whenever enableNative is true.

Changes

Today Target Old queries still work?
Span attributes turbo_module.total_call_count, .total_error_count, .total_duration_ms, .unique_methods, .arch, .top_module, .top_module_duration_ms react_native.module.call.count, .error.count, .duration.total, .call.distinct_count, react_native.architecture, react_native.module.top.name, .top.duration Yes, via Relay backfill
Aggregate span attributes turbo_modules.total_*, .unique_methods same targets Yes
Aggregate span op turbo_modules.aggregate turbo_module (registered) No, ops have no aliases
Per-method keys turbo_module.<module>.<method>.* and turbo_modules.<module>.<method>.<kind>.* one child span per (module, method) carrying react_native.module.name, .method, .kind plus the counters No, these keys can't be registered
Measurements turbo_modules.call_count, .error_count, .total_ms, .top_module_ms remove (they duplicate the span attributes) No
Tag event.kind: turbo_modules.aggregate remove No

Error-event tags (turbo_module.name, turbo_module.method) and contexts.turbo_module stay as they are. Sentry Conventions doesn't model event tags or contexts.

Before implementation

  • Write a short design sketch for the child spans: the number of spans added, payload size, and how it interacts with maxTopModulesPerSpan.
  • Decide how to ship. The aliased renames are safe in a minor. The op change, the per-method keys and the removed measurements are breaking, but the feature is @experimental, so a minor with a Changelog note is the proposal.

Acceptance criteria

  • No turbo_module.* or turbo_modules.* span attributes, measurements or event.kind tag are sent. Tests assert this.
  • The aggregate span uses op turbo_module.
  • Per-method data arrives as child spans with the static react_native.module.* attributes.
  • Changelog entry added.
  • Public docs updated wherever they list the old attribute names.
Agent notes
  • Files:
    • src/js/integrations/turboModuleContext.ts: attachWindowToSpan (around lines 386–440), with the per-method prefix at around line 426.
    • src/js/integrations/turboModuleContextFlush.ts: TURBO_MODULES_AGGREGATE_OP at line 13, attributes at lines 51–54, measurements at lines 63–69, event.kind at line 96, per-method prefix at line 127.
    • src/js/turbomodule/turboModuleTracker.ts: tags and context. Leave these unchanged.
  • Defaults: enableAggregateStats and enableSpanAttribution both default to true (turboModuleContext.ts:129-130). The integration is added in integrations/default.ts when enableNative is true.
  • The previous tracking issue (sentry-react-native#6168) is closed, but the rename was never done.
  • Use the design-first skill before coding.
主要言語
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 を短くまとめたダイジェスト。