mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-07 02:59:05 +00:00
fix _record_exception_on_span
This commit is contained in:
parent
26f6932767
commit
7367ed5147
1 changed files with 39 additions and 0 deletions
|
|
@ -387,3 +387,42 @@ class OpenInferenceLLMProviderValues(Enum):
|
|||
GOOGLE = "google"
|
||||
AZURE = "azure"
|
||||
AWS = "aws"
|
||||
|
||||
|
||||
class ErrorAttributes:
|
||||
"""
|
||||
Attributes for error information in spans.
|
||||
|
||||
These attributes follow OpenTelemetry semantic conventions for exceptions
|
||||
and are used to record error information from StandardLoggingPayloadErrorInformation.
|
||||
"""
|
||||
|
||||
ERROR_TYPE = "error.type"
|
||||
"""
|
||||
The type/class of the error (e.g., 'ValueError', 'OpenAIError', 'RateLimitError').
|
||||
Corresponds to StandardLoggingPayloadErrorInformation.error_class
|
||||
"""
|
||||
|
||||
ERROR_MESSAGE = "error.message"
|
||||
"""
|
||||
The error message describing what went wrong.
|
||||
Corresponds to StandardLoggingPayloadErrorInformation.error_message
|
||||
"""
|
||||
|
||||
ERROR_CODE = "error.code"
|
||||
"""
|
||||
The error code (e.g., HTTP status code like '500', '429', or provider-specific codes).
|
||||
Corresponds to StandardLoggingPayloadErrorInformation.error_code
|
||||
"""
|
||||
|
||||
ERROR_STACK_TRACE = "error.stack_trace"
|
||||
"""
|
||||
The full stack trace of the error.
|
||||
Corresponds to StandardLoggingPayloadErrorInformation.traceback
|
||||
"""
|
||||
|
||||
ERROR_LLM_PROVIDER = "error.llm_provider"
|
||||
"""
|
||||
The LLM provider where the error occurred (e.g., 'openai', 'anthropic', 'azure').
|
||||
Corresponds to StandardLoggingPayloadErrorInformation.llm_provider
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue