Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation-Implementation Gap for Session Tags #833

Open
devin-ai-integration bot opened this issue Mar 14, 2025 · 0 comments
Open

Documentation-Implementation Gap for Session Tags #833

devin-ai-integration bot opened this issue Mar 14, 2025 · 0 comments
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@devin-ai-integration
Copy link
Contributor

Description

Since release 0.4.0, AgentOps has transitioned to storing tags as OpenTelemetry span attributes with the key "session.tags" rather than directly in session objects. While this architectural improvement doesn't prevent backend filtering, it has created confusion about the proper methods for adding tags to sessions.

Current Problem

The documentation in `docs/v1/concepts/tags.mdx` mentions methods like `set_tags()` and `add_tags()`:

```python
agentops.set_tags(['test new tag'])
agentops.add_tags(['appended tag'])
```

However, these methods don't appear to be implemented in the current codebase. The only clear ways to add tags currently are:

  1. During initialization:
    ```python
    agentops.init(default_tags=['tag'])
    ```

  2. During session creation:
    ```python
    agentops.start_session(tags=["tag"])
    ```

Impact

This discrepancy between documentation and implementation creates confusion for users trying to add tags to sessions after they've been created.

Suggested Solutions

  1. Update the documentation: Revise `docs/v1/concepts/tags.mdx` and other relevant documentation to accurately reflect the current implementation and available methods for adding tags.

  2. Implement the missing methods: Add implementations for `add_tags()` and `set_tags()` that work with the new span attribute-based system.

Additional Context

  • The transition to OpenTelemetry span attributes is a positive architectural change that provides better standardization and integration.
  • The test file `tests/unit/sdk/test_instrumentation.py` confirms that tags are properly stored as span attributes with the key "session.tags".
  • The backend filtering functionality should still work with the attribute-based approach, but the user-facing API for adding tags needs clarification.
@devin-ai-integration devin-ai-integration bot added documentation Improvements or additions to documentation enhancement New feature or request labels Mar 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant