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
Bug: Go SDK never sets error.type on the span for failed calls #1985
OpenLIT Go SDK (sdk/go, OpenAI, Anthropic and vLLM instrumentation)
What happened?
error.type is never set on the span of a failed call. It is computed in the instrumentors (errType in openai/instrumentor.go, anthropic/instrumentor.go and vllm/instrumentor.go) but only attached to the gen_ai.client.operation.duration metric. helpers.RecordError records the exception and sets the status, and stops there.
The Python SDK sets it on the span (handle_exception in sdk/python/src/openlit/__helpers.py), and OpenTelemetry marks error.type as conditionally required on GenAI spans.
Steps to reproduce
Make an Anthropic or OpenAI call that returns 429 against an httptest server and inspect the span: status is Error with one exception event, and no error.type attribute.
Expected
error.type on the span, with the same value the metric already uses.
Activity