Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

telemetry: schema-first event registry (typed catalog + generated docs)

Abierto
#999 1 comentario 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
32/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Tranquilo
Stack tecnológico
typescript

Línea de trabajo

Empieza leyendo src/instrumentation/CONVENTIONS.md, los archivos por dominio de src/instrumentation/* y src/instrumentation/EVENTS.md. Sigue TelemetryService.trace/log/logError, Span y sus pruebas para comprender el tipado actual de eventos y propiedades. El trabajo estará terminado cuando se implemente el diseño de registro elegido, se actualicen la instrumentación y las pruebas, y la EVENTS.md generada supere su comprobación de actualización de CI.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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-set result that 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 TelemetryEventMap interface declaring every event with its properties and measurements (value unions spelled out).
  • TelemetryService.trace/log/logError constrained to keyof TelemetryEventMap; Span becomes generic (Span<E>) so setProperty/setMeasurement keys and values are type-checked per event. An undeclared event or attribute key becomes a compile error.
  • EVENTS.md generated from the registry (script walking the interface + JSDoc), with a CI --check mode 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/log as a union of registered names (names are already top-level string literals; near-zero churn).
  • ESLint restriction banning raw telemetry.trace(/.log( outside src/instrumentation (the layering rule from CONVENTIONS.md).
  • Golden event catalog aggregated from the test suite's sinks, checked like the existing OTLP goldens.
Lenguaje dominante
TypeScript
Estrellas
131
Forks
48
Merge medio
4 d 15 h
PR fusionados (30 d)
17

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de coder/vscode-coder

Todos los issues de coder/vscode-coder

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.