refactor: share error taxonomy between metrics and tracing plugins

Abierto
#1,053 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 3 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
42/100
Tipo de issue
Refactorización
Claridad
Bastante claro
Estado de actividad
Tranquilo
Stack tecnológico
python

Línea de trabajo

Start with classify_error() and the eight ERROR_TYPE_* constants in mellea/telemetry/metrics_plugins.py, then find where the tracing plugins set error.type on error spans. Move the classifier and constants into one shared module that both plugins import, and add mellea.error.type next to the existing error.type on error spans. Done when no duplicate constants remain and error spans carry both attributes, which the tests for the tracing plugin should check. Phase 3 depends on #1045 and #1047, so confirm those have landed first.

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

Descripción

area/telemetry p2 refactor

Background

Retired sub-issue #475 proposed creating mellea/telemetry/errors.py. That's no longer needed — mellea/telemetry/metrics_plugins.py already has classify_error() and 8 ERROR_TYPE_* constants, built during the metrics epic (issue #465).

Scope

  • Extract classify_error and ERROR_TYPE_* constants into a shared location (e.g., mellea/telemetry/errors.py or mellea/telemetry/_shared.py) so both metrics and tracing plugins can import from one source.
  • Have tracing plugins set mellea.error.type (semantic category) and error.type (exception class name) on error spans, matching metrics' labels. #1036 already sets error.type on the error path; this issue adds the semantic category alongside it.

Phase & dependencies

Phase 3 (polish). Depends on #1045 and #1047. Can start any time after Phase 1 lands.

Acceptance criteria

  • One source of truth for error classification across metrics and tracing.
  • No duplicate ERROR_TYPE_* constants.
  • Error spans carry both mellea.error.type (semantic) and error.type (exception class).

Parent epic: #444

Lenguaje dominante
Python
Estrellas
1.8k
Forks
161
Merge medio
4 d 3 h
PR fusionados (30 d)
45

Preparar el entorno

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 generative-computing/mellea

Todos los issues de generative-computing/mellea

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.