Skip to content

feat: add Error Span Kind decorator and standalone function#1414

Closed
icohangar-ops wants to merge 1 commit into
AgentOps-AI:mainfrom
icohangar-ops:feat/error-span-kind
Closed

feat: add Error Span Kind decorator and standalone function#1414
icohangar-ops wants to merge 1 commit into
AgentOps-AI:mainfrom
icohangar-ops:feat/error-span-kind

Conversation

@icohangar-ops

Copy link
Copy Markdown

Fixes #1025

Adds a new error span kind with both a decorator (@agentops.error()) and standalone function (agentops.error(name, message)). Supports sync and async functions. Each invocation creates a span with kind=error and captures exception context.

Usage:

from agentops import error

@error
def handle_error():
    ...

# Standalone
error(name="db_timeout", message="Connection pool exhausted")

Adds a new error span kind with:
- @agentops.error() decorator that wraps functions and creates error spans on exception
- agentops.error(name, message) standalone function for ad-hoc error recording
- ERROR span kind in SpanKind enum
- Support for both sync and async functions

Fixes #1025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Create Error Span Kind

2 participants