Register React Native span ops, Expo resource attributes, long-task metric and stall keys in Sentry Conventions

未关闭
#7,053 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
35/100
Issue 类型
功能
描述清晰度
描述清楚
活跃度
活跃
技术栈
react-native, typescript

调研方向

Start with the listed SDK entry points: src/js/tracing/ops.ts, the Expo and React Navigation tracing files, src/js/integrations/longTask.ts, and the stall measurement files. Check how each value is sent, then review the Sentry Conventions registries and use yarn run create:metric for the metric entry. Done means the conventions PRs are merged, the SDK uses registered constants, and rejected or deferred items have reasons recorded; each conventions PR also needs code owner approval and a three business day wait.

由索引模型根据 Issue 内容生成。

描述

React-Native Task

Several span ops, attributes and a metric that only the React Native SDK sends aren't in Sentry Conventions. Register them, then switch the SDK to the constants.

Span ops

  • navigation.processing, navigation.prefetch
  • resource.image.load, resource.image.prefetch: compare with the registered resource.img.
  • resource.asset
  • ui.action.touch: register it, or plan a move to the registered ui.interaction.press. A move changes the op name, so it would go in the next major.

Attributes

  • image.url, image.url_count (Expo Image): check whether url.full fits image.url.
  • asset.count (Expo Asset)
  • sentry.rn.discard_reason: first check whether it reaches the wire. If it does, register it; if it's internal-only, strip it before sending.

Metric

  • react_native.long_task.duration (distribution, milliseconds) goes into the metrics registry.

Stall measurements

  • stall_count and stall_longest_time aren't registered. stall_total_time is already deprecated in favour of app.vitals.stall.duration; that migration is tracked in the next-major issue.

Acceptance criteria

  • The Sentry Conventions PRs are merged (each needs one code-owner approval, then a 3-business-day wait).
  • The SDK uses the constants for everything registered.
  • Anything rejected or deferred is recorded in this issue, with the reason.
Agent notes
  • Ops: src/js/tracing/ops.ts, tracing/reactnavigation.ts (lines 535 and 661), tracing/expoRouter.ts (line 102), tracing/expoImage.ts (lines 101 and 152), tracing/expoAsset.ts (line 76), touchevents.tsx (line 285).
  • Attributes: tracing/expoImage.ts (lines 105, 106 and 156), tracing/expoAsset.ts (line 80), tracing/onSpanEndUtils.ts (line 19).
  • Metric: src/js/integrations/longTask.ts (line 9).
  • Stall keys: src/js/measurements.ts, tracing/integrations/stalltracking.ts.
  • Metric file shape: model/metrics/<ns>/<ns>__x__y.json with {key, brief, instrument, unit, attributes}, created with yarn run create:metric.
主要语言
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 摘要。