agentops icon indicating copy to clipboard operation
agentops copied to clipboard

[Feature]: Create arbitrary log spans

Open areibman opened this issue 7 months ago • 1 comments

💡 Feature Description and Proposed Solution

Langfuse has the functionality that lets users create log-style spans. They look something like this:

self.trace.event(name="xml_tool_call_limit_reached", level="DEFAULT", status_message=(
                                f"XML tool call limit reached - not yielding more content chunks"))

This is convenient for just showing where things might've gone wrong in a trace.

It would be great to have 2 functions:

  • agentops.log(...)
  • agentops.error(...)

🤔 Related Problem

No response

🤝 Contribution

  • [ ] Yes, I'd be happy to submit a pull request with these changes.
  • [ ] I need some guidance on how to contribute.
  • [ ] I'd prefer the AgentOps team to handle this update.

areibman avatar May 30 '25 21:05 areibman

I have create a TraceState enum in #1015 which has 3 StatusCode from OpenTelemetry mapped to strings.

I think having agentops.set_state(<state in str or agentops.<STATE>>) would be a better UX.

dot-agi avatar May 30 '25 21:05 dot-agi