You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
refactor: move tracing error-path closure into generation_error plugin hook #1047
Today, mellea/core/base.py:520–541 reaches into mot._meta["_telemetry_span"], calls set_span_error / end_backend_span, and then fires the generation_error hook. This means:
Core code knows about tracing internals.
Any tracing plugin hooking generation_error would find the span already closed.
After PR #1036 lands, the error-path closure is consolidated through finalize_backend_span(error=...) but still lives in core/base.py. Once #1045 lands, tracing plugins should own error-path span closure.
Scope
Remove the tracing-specific block from core/base.py entirely.
Handle error-path span closure inside BackendTracingPlugin (or a dedicated ErrorTracingPlugin if cleaner) via the generation_error hook.
Retire or internalize finalize_backend_span as part of this move — its logic becomes plugin-internal rather than a helper called from core/base.py.
Activity
refactor(telemetry)!: move backend tracing onto plugin/hook pattern
refactor(telemetry)!: move backend tracing onto plugin/hook pattern (g…