Rename TurboModule attributes and span op to match Sentry Conventions
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 35/100
- Issue 类型
- 功能
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- react-native, typescript
- 领域
- mobile, observability
调研方向
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 内容生成。
描述
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.*orturbo_modules.*span attributes, measurements orevent.kindtag 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_OPat line 13, attributes at lines 51–54, measurements at lines 63–69,event.kindat line 96, per-method prefix at line 127.src/js/turbomodule/turboModuleTracker.ts: tags and context. Leave these unchanged.
- Defaults:
enableAggregateStatsandenableSpanAttributionboth default to true (turboModuleContext.ts:129-130). The integration is added inintegrations/default.tswhenenableNativeis true. - The previous tracking issue (sentry-react-native#6168) is closed, but the rename was never done.
- Use the
design-firstskill before coding.
- 主要语言
- TypeScript
- 星标
- 1.8k
- 派生
- 371
- 平均合并
- 22 小时 3 分钟
- 30 天内合并 PR
- 106
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 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
-
area:config bug priority:medium
难度 2/5 1-3 小时 新手友好度 88/100
Doezer/Questarr#1451 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
sidebandstudio/clawtrate#1156 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
WenyuChiou/agent-board#1993 ·
维护者通常 1 天内回复
-
bug design
难度 2/5 1-3 小时 新手友好度 88/100
Colorado-Startups/coloradostartups.org#151 ·
维护者通常 1 天内回复
-
question
难度 2/5 1-3 小时 新手友好度 78/100
jarrodwatts/claude-hud#883 · 1 条评论 ·
维护者通常 1 天内回复