Add `@sentry/conventions` dependency and use its constants for registered keys
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 53/100
- issue の種類
- リファクタリング
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- react-native, typescript
調査の方向性
Start with packages/core/package.json and the internal entry points src/js/tracing/ops.ts and src/js/tracing/semanticAttributes.ts, then inspect the listed files containing the keys. Check the installed @sentry/conventions version to confirm its exported constant names, and read packages/core/AGENTS.md for the dependency approval rule. Done when registered keys use the conventions constants, the documentation rules are updated, and the listed build, dependency, API report, and TypeScript compatibility checks pass.
索引モデルが issue の本文から書いたものです。
説明
The SDK hardcodes attribute keys and span ops as strings. For keys that Sentry Conventions already registers, use the constants from @sentry/conventions instead. Nothing changes on the wire.
Dependency
- Add
@sentry/conventionstodependenciesinpackages/core/package.json. - Use the same range as
@sentry/core(^0.16.0today). On 0.x a caret only allows patch updates, so a different range ships a second copy. @sentry/corealready loads@sentry/conventions/attributesat runtime, so the module is already in app bundles./opadds about 11 KB unminified.- Import only through the subpaths
@sentry/conventions/attributesand@sentry/conventions/op. The package ships root-levelattributes.jsandop.jsfiles, so this also works with older Metro versions that ignoreexports. - From now on, bump it together with each
@sentry/*JS bump.
Keys to swap
| Today | Constant |
|---|---|
ops navigation, ui.action, http.client |
NAVIGATION, UI_ACTION, HTTP_CLIENT |
ops app.update.check, app.update.download |
APP_UPDATE_CHECK, APP_UPDATE_DOWNLOAD |
app.vitals.start.type, app.vitals.start.screen |
APP_VITALS_START_TYPE, APP_VITALS_START_SCREEN |
sentry.origin, sentry.release, sentry.replay_id |
SENTRY_* |
log attributes device.brand, device.family, device.model, os.name, os.version |
DEVICE_*, OS_* |
thread.id, thread.name, http.query |
THREAD_*, HTTP_QUERY |
Docs
Add a rule to packages/core/AGENTS.md and the code-guidelines skill: attribute keys and ops come from @sentry/conventions, and a new key needs a Sentry Conventions PR merged first.
Acceptance criteria
- Existing tests pass unchanged.
yarn buildpasses from a clean state.yarn circularDepCheckpasses.yarn api-report:checkshows no change.- The TS 3.8 compat job stays green.
Agent notes
- Keep
src/js/tracing/ops.tsandsrc/js/tracing/semanticAttributes.tsas the internal entry points, re-exporting from conventions, so imports elsewhere don't change. Neither file is in the public API report. - Where the keys are:
- Ops:
tracing/ops.ts,tracing/onSpanEndUtils.ts,integrations/expoupdateslistener.ts. - Log attributes:
integrations/logEnricherIntegration.ts. - Thread keys:
tracing/span.ts,profiling/uiProfilingIntegration.ts. http.query:integrations/devicecontext.ts.
- Ops:
- In 0.33 the op exports are named without a suffix (
NAVIGATION,HTTP_CLIENT). The 0.16 package uses*_SPAN_OPnames, so check which version is installed after the range bump. - Adding a dependency needs maintainer approval (AGENTS.md: Ask first).
- 主要言語
- TypeScript
- スター
- 1.8k
- フォーク
- 371
- 平均マージ
- 22時間 3分
- マージ済み PR(30日)
- 106
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
getsentry/sentry-react-native のほかの issue
-
React-Native
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
getsentry/sentry-react-native#7073 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Improvement React-Native
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
getsentry/sentry-react-native#7055 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
React-Native Replays Task
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
getsentry/sentry-react-native#6680 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Improvement React-Native
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
getsentry/sentry-react-native#6143 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
React-Native Task User Feedbacks
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
getsentry/sentry-react-native#5932 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
getsentry/sentry-react-native の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
yavorsky/unbuilt.app#65 ·
-
CVE security
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
mckinsey/agents-at-scale-ark#4091 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
factory:subtask
難易度 1/5 1時間未満 初心者へのやさしさ 94/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
NUS-Project-SaBai/project-sabai#386 ·
メンテナーはふだん 3 日以内に返信
-
android needs clarification
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
super-productivity/super-productivity#12105 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信