Add a CI check for attribute keys not in Sentry Conventions

Aperta
#7,056 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
58/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
github-actions, typescript
Ambito
ci-cd, tooling

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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).
Lingua principale
TypeScript
Stelle
1.8k
Fork
371
Merge medio
22h 3m
PR unite (30g)
106

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di getsentry/sentry-react-native

Tutte le issue di getsentry/sentry-react-native

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.