telemetry: schema-first event registry (typed catalog + generated docs)
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 32/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Stack tecnologico
- typescript
- Ambito
- observability-sre
Direzione di ricerca
Inizia leggendo src/instrumentation/CONVENTIONS.md, i file specifici per dominio sotto src/instrumentation/* e src/instrumentation/EVENTS.md. Segui TelemetryService.trace/log/logError, Span e i relativi test per comprendere l'attuale tipizzazione degli eventi e delle proprietà. Il lavoro è completato quando il design del registro scelto è implementato, la strumentazione e i test sono aggiornati e l'EVENTS.md generato supera il relativo controllo di aggiornamento della CI.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problem
Telemetry events, properties, and value unions are declared per-domain in src/instrumentation/* and documented by hand in src/instrumentation/EVENTS.md. Nothing structurally prevents:
- emitting an event name that isn't cataloged anywhere,
- adding/renaming a property without updating the docs,
- drifting from the conventions in
src/instrumentation/CONVENTIONS.md(a recent audit found camelCase keys, kebab-case enum values, and caller-setresultthat review missed).
Proposal
Adopt a schema-first registry as the single source of truth for the telemetry surface, the way OTel itself defines semantic conventions in a registry and generates code + docs from it (Weaver).
TS-native sketch:
- A central
TelemetryEventMapinterface declaring every event with its properties and measurements (value unions spelled out). TelemetryService.trace/log/logErrorconstrained tokeyof TelemetryEventMap;Spanbecomes generic (Span<E>) sosetProperty/setMeasurementkeys and values are type-checked per event. An undeclared event or attribute key becomes a compile error.EVENTS.mdgenerated from the registry (script walking the interface + JSDoc), with a CI--checkmode so the doc can never go stale.
Known costs / open questions
- Every instrumentation class and its tests are touched by the
Span<E>generic. - Phase names compose at runtime (
parent.child), so child phases need registry entries or looser typing. - The registry partially duplicates per-domain unions the instrumentation classes already export; decide whether the registry imports those types or replaces them.
Cheaper interim guards (could land independently)
- Type the event-name parameter of
TelemetryService.trace/logas a union of registered names (names are already top-level string literals; near-zero churn). - ESLint restriction banning raw
telemetry.trace(/.log(outsidesrc/instrumentation(the layering rule from CONVENTIONS.md). - Golden event catalog aggregated from the test suite's sinks, checked like the existing OTLP goldens.
- Lingua principale
- TypeScript
- Stelle
- 131
- Fork
- 48
- Merge medio
- 4g 16h
- PR unite (30g)
- 13
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di coder/vscode-coder
-
tech-debt
coder/vscode-coder#1120 · 1 commento · 1 assegnatario ·
-
tech-debt
coder/vscode-coder#1119 · 1 commento · 1 assegnatario ·
-
enhancement tech-debt
Difficoltà 3/5 1-2 giorni Idoneità per principianti 74/100
coder/vscode-coder#1118 · 1 commento ·
-
coder/vscode-coder#1113 · 3 commenti · 1 assegnatario ·
-
Flush the connection log buffer after N failed reconnect attempts against an unreachable server Apertaenhancement tech-debt
Difficoltà 5/5 Più di una settimana Idoneità per principianti 45/100
coder/vscode-coder#1112 · 1 commento ·
Tutte le issue di coder/vscode-coder
Issue simili
-
Type/Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
OpenNSW/nsw-srilanka#497 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
0xMiden/bridge-portal#132 ·
-
react-doctor severity:warning tech-debt
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
digidem/comapeo-cloud-app#403 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100