refactor: share error taxonomy between metrics and tracing plugins

Aperta
#1,053 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 3 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
42/100
Tipo di issue
Refactoring
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
python
Ambito
observability

Direzione di ricerca

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.

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

Descrizione

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

Lingua principale
Python
Stelle
1.8k
Fork
161
Merge medio
4g 3h
PR unite (30g)
45

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

Tutte le issue di generative-computing/mellea

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.