Add a CI check for attribute keys not in Sentry Conventions

Offen
#7,056 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
58/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
github-actions, typescript
Bereich
ci-cd, tooling

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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).
Vorherrschende Sprache
TypeScript
Sterne
1.8k
Forks
371
Ø Merge
22 Std. 3 Min.
Gemergte PRs (30 T.)
106

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus getsentry/sentry-react-native

Alle Issues in getsentry/sentry-react-native

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.