agentops
agentops copied to clipboard
Debug agentops attribute error in trace
📥 Pull Request
📘 Description Updated AgentOps documentation examples to reflect current SDK API usage, specifically:
- Replaced
agentops.trace(...)used as a context manager withagentops.start_trace(...)to resolveAttributeError. - Migrated deprecated
agentops.start_session()/agentops.end_session()patterns toagentops.start_trace()context managers. - Corrected
@agentops.tracedecorator import and usage. - Aligned tag examples with
default_tagsat init andtagsinstart_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.
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