agentops icon indicating copy to clipboard operation
agentops copied to clipboard

Debug agentops attribute error in trace

Open areibman opened this issue 4 months ago • 1 comments

📥 Pull Request

📘 Description Updated AgentOps documentation examples to reflect current SDK API usage, specifically:

  • Replaced agentops.trace(...) used as a context manager with agentops.start_trace(...) to resolve AttributeError.
  • Migrated deprecated agentops.start_session()/agentops.end_session() patterns to agentops.start_trace() context managers.
  • Corrected @agentops.trace decorator import and usage.
  • Aligned tag examples with default_tags at init and tags in start_trace. These changes ensure documentation accurately guides users on AgentOps tracing and session management.

🧪 Testing The changes are documentation updates to align with the current AgentOps SDK API. The fix for the AttributeError was derived from understanding the SDK's intended usage of agentops.trace (decorator) vs. agentops.start_trace (context manager). The updated examples reflect the correct and tested patterns for AgentOps integration.


Open in Cursor Open in Web

areibman avatar Aug 15 '25 17:08 areibman

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch. Learn more about Cursor Agents

cursor[bot] avatar Aug 15 '25 17:08 cursor[bot]