Add a CI check for attribute keys not in Sentry Conventions

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

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
58/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
github-actions, typescript
领域
ci-cd, tooling

调研方向

Start by checking whether the shared cross-SDK conventions check is available; otherwise follow the issue’s suggested extraction from packages/core/src/js and compare keys with the installed @sentry/conventions types. Read buildandtest.yml to find where the check belongs and add an allowlist for warn-only mode. Done means the check runs on every PR in warn-only mode and has a documented path to strict mode after registration issues land.

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

描述

React-Native Task

Add a CI check that flags attribute keys and span ops the SDK sends that aren't in Sentry Conventions, or are deprecated there.

Rollout

  1. Warn-only: run the check on every PR. Existing keys go on an allowlist.
  2. Shrink the allowlist as the registration issues in this project land.
  3. Strict: fail the build on new keys that aren't registered. The allowlist ends up empty, or holds only breaking renames scheduled for the next major.

Approach

  • Prefer the shared cross-SDK check once it exists, with a small RN config.
  • If it isn't available yet, add an interim script that extracts the keys from packages/core/src/js and compares them with the installed @sentry/conventions.

Acceptance criteria

  • The check runs in buildandtest.yml in warn-only mode, with an allowlist file.
  • It's switched to strict mode once the registration issues are done.
Agent notes
  • The sweep that produced this project extracted every dotted string literal from src/js (tests excluded), compared them with dist/attributes.d.ts and dist/op.d.ts from @sentry/conventions, and filtered out paths, modules and file names. The same approach works as an interim script.
  • It doesn't catch dynamically built keys (template strings). The TurboModule per-method keys were the only ones, and they're removed by the TurboModule rename issue.
  • CI workflow changes need maintainer approval (AGENTS.md: Ask first).
主要语言
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 摘要。