refactor: share error taxonomy between metrics and tracing plugins

Đang mở
#1,053 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 3 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
42/100
Loại issue
Tái cấu trúc
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
python
Lĩnh vực
observability

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
Python
Star
1.8k
Fork
161
Merge trung bình
4 ngày 3 giờ
Pull request đã merge (30 ngày)
45

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của generative-computing/mellea

Tất cả issue của generative-computing/mellea

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.