8000 Tags · RepoBirdBot/agentops · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Tags: RepoBirdBot/agentops

Tags

0.4.9

Toggle 0.4.9's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Bump version to 0.4.9 in pyproject.toml (AgentOps-AI#948)

0.4.8

Toggle 0.4.8's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Removed import break (AgentOps-AI#937)

* breaking import

* upgrade

0.4.7

Toggle 0.4.7's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Bump version to 0.4.7 (AgentOps-AI#933)

0.4.6

Toggle 0.4.6's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
bump to `0.4.6` (AgentOps-AI#911)

0.4.5

Toggle 0.4.5's commit message

Partially verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
We cannot verify signatures from co-authors, and some of the co-authors attributed to this commit require their commits to be signed.
Refactor Agents SDK instrumentation. (AgentOps-AI#854)

* Fix: Improve serialization of completions/responses in Agents SDK instrumentation

Co-Authored-By: travis@agentops.ai <travis@agentops.ai>

* Fix: Improve serialization of completions/responses in Agents SDK instrumentation

Co-Authored-By: travis@agentops.ai <travis@agentops.ai>

* Tests for completions.

* Separate OpenAI tests into `completion` and `responses`

* Refactor completions and responses unit tests.

* agents SDK test using semantic conventions.

* semantic conventions in openai completions and responses tests

* Exporter refactor and generalization. standardization and simplification of version of values into semantic types.

* Continued refactor of Agents instrumentor. Usurp third-party implementation.

* Semantic conventions for messages.

* Tools for generating real test data from OpenAI Agents.

* support tool calls and set of responses. missing import

* reasoning tokens, semantic conventions, and implementation in OpenAI agent responses.

* populate agents SDK tests with fixture data. Simplify fixture data generation tooling. increased test coverage

* Add chat completion support to openai_agents. Cleanup OpenAI agents instrumentation.

* Agents instrumentor cleanup.

* Cleanup.

* Cleanup init.

* absolute import.

* fix breaking error.

* Correct naming

* rename

* Refactor completions to always use semantic conventions.

* More robust output

* use openai_agents tracing api to gather span data.

* Agents associates spans with a parent span and exports.

* OpenAi responses instrumentor.

* Delete examples/agents-examples/basic/hello_world.py

* pass strings to serialize and return them early.

* deduplication and better hierarchy. simplification of tests. separation of concerns.

* Notes and working documents that should not make it into main.

* more descriptive debug messaging in OpenAI Agents instrumentor

* pertinent testing information in claude.md.

* better version determination for the library.

* Test for generation tokens as well.

* Cleanup attribute formatting to use modular function format with specific responsibilites. Spans are now nested and started/ended at the correct time. Tests generate fixture data from the live API for OpenAI agents.

* Remove duplicated model export from processor.

* nest all spans under the parent_trace root span and open and close the root span only after execution is complete

* clean up common attributes parsing helpers.

* Simplify processor.

* Cleanup exporter.

* Cleanup instrumentor

* Cleanup attributes

* Update README and SPANS definition. Add example with tool usage.

* Fix tool usage example.

* Get completion data on outputs.

* Delete notes

* Fix tests for attributes. Rewmove debug statements.

* Implement tests for OpenAi agents.

* Better naming for spans.

* Openai Response type parsing improvements.

* Cleanup exporter imports and naming.

* Handoff agent example.

* Cleanup imports on common.

* Disable openai completions/responses tests. TODO probably delete these.

* Disable openai responses intrumentor; it is handled inside openai_agents exclusively for now.

* Add note about enabling chat.completions api instead of responses.

* Move exporter convention notes to README

* Update tests.

* Disable openai responses instrumentation test.

* Skip `parse` serialization tests.

* Cleanup openai responses instrumention and tests; will be included in a separate PR.

* Resolve type checking errors.

* get correct library version

* remove debug statements and import LIBRARY_VERSION

* Log deeplink to trace on AgentOps dashboard. (AgentOps-AI#879)

* Log deeplink to trace on AgentOps dashboard.

* Test coverage, type checking.

* Get app_url from config.

* Don't format trace_id in the URL as a UUID, just a hex string.

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: travis@agentops.ai <travis@agentops.ai>
Co-authored-by: Pratyush Shukla <ps4534@nyu.edu>
Co-authored-by: Claude <noreply@anthropic.com>

0.4.4

Toggle 0.4.4's commit message

Partially verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
We cannot verify signatures from co-authors, and some of the co-authors attributed to this commit require their commits to be signed.
0.4.4 (AgentOps-AI#848)

* 0.4.4

Signed-off-by: Teo <teocns@gmail.com>

* Client.init() | auto_start_session | forward tags

Signed-off-by: Teo <teocns@gmail.com>

* client: recreate Config on init()

Signed-off-by: Teo <teocns@gmail.com>

* mock_req: /v3/auth/token to return { project_id, token, api_key }

Signed-off-by: Teo <teocns@gmail.com>

* cleanup dirty files

Signed-off-by: Teo <teocns@gmail.com>

* Isolate telemetry setup (`setup_telemetry`)

Signed-off-by: Teo <teocns@gmail.com>

* core shutdown: remove redundant initialized check

Signed-off-by: Teo <teocns@gmail.com>

* Simplify core shutdown (flush SynchronousSpanProcessor instead of iterating processors)

Signed-off-by: Teo <teocns@gmail.com>

* Improved TracingCore Config

Signed-off-by: Teo <teocns@gmail.com>

* tests: couple instrumentation tester with TracingCore's lifecycle

Signed-off-by: Teo <teocns@gmail.com>

* Base for test_session_legacy

Signed-off-by: Teo <teocns@gmail.com>

* uv lock

Signed-off-by: Teo <teocns@gmail.com>

* tests/benchmark/benchmark_init.py

Signed-off-by: Teo <teocns@gmail.com>

* Remove deprecated SDK tests - favor test_decorators

Signed-off-by: Teo <teocns@gmail.com>

* update `openai` dep and `uv.lock` file

* fix: display session url when using `agentops.init` (AgentOps-AI#856)

* show session url on init

* fix: pass tags to start_session when auto-starting sessions

Co-Authored-By: Constantin-Doru Teodorescu <teo@agentops.ai>

* backwards compat: track_agent, end_all_sessions (AgentOps-AI#847)

Signed-off-by: Teo <teocns@gmail.com>

* Client.init() | auto_start_session | forward tags

Signed-off-by: Teo <teocns@gmail.com>

* client: recreate Config on init()

Signed-off-by: Teo <teocns@gmail.com>

* mock_req: /v3/auth/token to return { project_id, token, api_key }

Signed-off-by: Teo <teocns@gmail.com>

* cleanup dirty files

Signed-off-by: Teo <teocns@gmail.com>

* Isolate telemetry setup (`setup_telemetry`)

Signed-off-by: Teo <teocns@gmail.com>

* core shutdown: remove redundant initialized check

Signed-off-by: Teo <teocns@gmail.com>

* Simplify core shutdown (flush SynchronousSpanProcessor instead of iterating processors)

Signed-off-by: Teo <teocns@gmail.com>

* Improved TracingCore Config

Signed-off-by: Teo <teocns@gmail.com>

* tests: couple instrumentation tester with TracingCore's lifecycle

Signed-off-by: Teo <teocns@gmail.com>

* Base for test_session_legacy

Signed-off-by: Teo <teocns@gmail.com>

* uv lock

Signed-off-by: Teo <teocns@gmail.com>

* tests/benchmark/benchmark_init.py

Signed-off-by: Teo <teocns@gmail.com>

* Remove deprecated SDK tests - favor test_decorators

Signed-off-by: Teo <teocns@gmail.com>

* update `openai` dep and `uv.lock` file

* fix: pass tags to start_session when auto-starting sessions

Co-Authored-By: Constantin-Doru Teodorescu <teo@agentops.ai>

* forgot `{` in `start_session`

* remove `getattr`

* fix for recursion and passing `default_tags`

* client: recreate Config on init()

Signed-off-by: Teo <teocns@gmail.com>

* cleanup dirty files

Signed-off-by: Teo <teocns@gmail.com>

* Simplify core shutdown (flush SynchronousSpanProcessor instead of iterating processors)

Signed-off-by: Teo <teocns@gmail.com>

---------

Signed-off-by: Teo <teocns@gmail.com>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Constantin-Doru Teodorescu <teo@agentops.ai>
Co-authored-by: teocns <59549574+teocns@users.noreply.github.com>
Co-authored-by: Teo <teocns@gmail.com>

* `auto_start_session` must be `False` by default

* Legacy session support on `end_session`. Backwards-compatible `record` event.

* CrewAI compat tests. track_tool decorator for compat.

* Use valid type.

* I don't think Event ever passed type checks.

* Type checking runs clean. Fix import.

* Auto start sessions.

* track_agent noop should be a decorator

* Handle trace lifecycle in legacy with backwards
compatibility for Crew 105 and Crew < 105.

* drop session export delay to one second and expose it as a public configuration parameter.

* Clean up docstrings in legacy

* type checking

* agentops.config: dataclass -slots | compat 3.9

Signed-off-by: Teo <teocns@gmail.com>

* deps: py3.9 backward compat | constraints | resolver

Signed-off-by: Teo <teocns@gmail.com>

---------

Signed-off-by: Teo <teocns@gmail.com>
Co-authored-by: Pratyush Shukla <ps4534@nyu.edu>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Constantin-Doru Teodorescu <teo@agentops.ai>
Co-authored-by: Travis Dent <tcdent@gmail.com>

0.4.3

Toggle 0.4.3's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
fix-a-lot (AgentOps-AI#830)

Fixes AgentOps-AI#827 
Fixes AgentOps-AI#787
Fixes AgentOps-AI#783 

---


Restores `start_session` from legacy SDK

```
import openai

import agentops

agentops.start_session()


response = openai.chat.completions.create(
    model="gpt-3.5-turbo", messages=[{"role": "user", "content": "Write a one-line joke"}]
)
```

<img width="279" alt="image" src="https://github.com/user-attachments/assets/5b339e41-19bd-4a84-b981-25f971f5b329" />


---

Implements correct decorator nesting and traces context.


```
uv run examples/sdk/basic.py
```


<img width="347" alt="image" src="https://github.com/user-attachments/assets/1408689b-4bb0-43aa-abdf-25dd2d03f5e9" />


Signed-off-by: Teo <teocns@gmail.com>

0.4.2

Toggle 0.4.2's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
version: 0.4.2 (AgentOps-AI#824)

bump version (again)

0.4.1

Toggle 0.4.1's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Remove dotenv, version bump. (AgentOps-AI#822)

0.4.0

Toggle 0.4.0's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
[RELEASE] `v0.4.0` (AgentOps-AI#820)

* agentops.start_session: accept **kwargs

Signed-off-by: Teo <teocns@gmail.com>

* tests: isolate session fixtures

Signed-off-by: Teo <teocns@gmail.com>

* tests: session fixture - introduce kwargs marker

Signed-off-by: Teo <teocns@gmail.com>

* session: add auto_start property

Signed-off-by: Teo <teocns@gmail.com>

* move default_config from session->config

Signed-off-by: Teo <teocns@gmail.com>

* session/state

Signed-off-by: Teo <teocns@gmail.com>

* session: dict() and json()

Signed-off-by: Teo <teocns@gmail.com>

* session: use slots

Signed-off-by: Teo <teocns@gmail.com>

* session: improve fields

Signed-off-by: Teo <teocns@gmail.com>

* session: general improvements

Signed-off-by: Teo <teocns@gmail.com>

* telemetry/helpers: dict_to_span_attributes

Signed-off-by: Teo <teocns@gmail.com>

* cleanup

Signed-off-by: Teo <teocns@gmail.com>

* test: add tests for Session serialization and encoding

* session._tracer -> session.telemetry

Signed-off-by: Teo <teocns@gmail.com>

* save

Signed-off-by: Teo <teocns@gmail.com>

* session: logger improvements, comments

Signed-off-by: Teo <teocns@gmail.com>

* Create auto instrumentation features

Signed-off-by: Teo <teocns@gmail.com>

* Move session_generator under tests/fixtures/session.py

Signed-off-by: Teo <teocns@gmail.com>

* ++context

Signed-off-by: Teo <teocns@gmail.com>

* integration tests refactor TOOD move

Signed-off-by: Teo <teocns@gmail.com>

* telemetry: -context

Signed-off-by: Teo <teocns@gmail.com>

* Move openai instrumentation to third_party/

Signed-off-by: Teo <teocns@gmail.com>

* cleanup test_session.py

Signed-off-by: Teo <teocns@gmail.com>

* chore(pyproject): add third_party

Signed-off-by: Teo <teocns@gmail.com>

* add logging to instrumentation/__init__.py

Signed-off-by: Teo <teocns@gmail.com>

* cleanup telemetry/mixin

Signed-off-by: Teo <teocns@gmail.com>

* test client instrumentation

Signed-off-by: Teo <teocns@gmail.com>

* _singleton.py

Signed-off-by: Teo <teocns@gmail.com>

* +exceptions.py

Signed-off-by: Teo <teocns@gmail.com>

* +fixtures/config.py

Signed-off-by: Teo <teocns@gmail.com>

* cleanup tests/fixtures/event,py

Signed-off-by: Teo <teocns@gmail.com>

* cleanup tests/unit/conftest.py

Signed-off-by: Teo <teocns@gmail.com>

* test_config.py: -test_invalid_parent_key

Signed-off-by: Teo <teocns@gmail.com>

* config: +auto_init

Signed-off-by: Teo <teocns@gmail.com>

* cleanup __init__.py

Signed-off-by: Teo <teocns@gmail.com>

* client: improvements, auto start, conditional_singleton

Signed-off-by: Teo <teocns@gmail.com>

* cleanups

Signed-off-by: Teo <teocns@gmail.com>

* config / logger setup improvements

Signed-off-by: Teo <teocns@gmail.com>

* save

Signed-off-by: Teo <teocns@gmail.com>

* Update instrumentation/README.md

Signed-off-by: Teo <teocns@gmail.com>

* instrumentation: use global tracer_provider

Signed-off-by: Teo <teocns@gmail.com>

* instrumentation/openai: add copyrights - NOTICE.md, LICENSE

Signed-off-by: Teo <teocns@gmail.com>

* tests/unit/test_client.py

Signed-off-by: Teo <teocns@gmail.com>

* tests/unit/test_client.py: add session-related tests

Signed-off-by: Teo <teocns@gmail.com>

* Added Anthropic Provider

* Added Cohere Provider

* Added Groq Provider

* Added Haystack Provider

* Added Mistralai Provider

* Added Ollama Provider

* Added Crewai Provider

* Added implementation

* Removed third_party

* use `mistralai<1.0.0` for instrumentation

* chore(pyproject.toml): update mistralai version constraint to >=0.2.0,<1.0.0 according to instrumentation/mistralai `_instruments`

* config: explode kwargs, add processor & exporter

Signed-off-by: Teo <teocns@gmail.com>

* agentops/telemetry/session: hook up with config params

Signed-off-by: Teo <teocns@gmail.com>

* test_client: +exporter, processor args tests

Signed-off-by: Teo <teocns@gmail.com>

* config: dict() and json() methods

Signed-off-by: Teo <teocns@gmail.com>

* refactor(session): update config serialization method

* tests: isolate reset_instrumentation fixture

Signed-off-by: Teo <teocns@gmail.com>

* cleanup tests

Signed-off-by: Teo <teocns@gmail.com>

* agentops.init(): add tags to **kwargs, merge with default_tags

* remove parent_key concept

Signed-off-by: Teo <teocns@gmail.com>

* config: use slots

Signed-off-by: Teo <teocns@gmail.com>

* cleanup tests

Signed-off-by: Teo <teocns@gmail.com>

* tests/fixtures/instrumentation: use InMemorySpanExporter

Signed-off-by: Teo <teocns@gmail.com>

* refactor(tests): simplify mock client implementation

* Squash merge redesign-client into redesign

Signed-off-by: Teo <teocns@gmail.com>

* feat(types): add ISOTimeStamp type annotation

* refactor(session_tracer): update timestamp type annotations

* refactor session+telemetry modules structure

Signed-off-by: Teo <teocns@gmail.com>

* refactor(session): rename telemetry to mixin and update code

* session/tracer: refactor and remove concept of nonrecordingspan

Signed-off-by: Teo <teocns@gmail.com>

* remove _ession_id fallback

Signed-off-by: Teo <teocns@gmail.com>

* merge Session w/ SessionTelemetryMixin

Signed-off-by: Teo <teocns@gmail.com>

* add test.py

Signed-off-by: Teo <teocns@gmail.com>

* save

Signed-off-by: Teo <teocns@gmail.com>

* Squash merge redesign-session-client-remove-signals into redesign-old

Signed-off-by: Teo <teocns@gmail.com>

* Client HTTP Module Refactoring and Test Fixes (AgentOps-AI#714)

Client HTTP Module Refactoring and Test Fixes AgentOps-AI#714

* tests_http_client: adapt mock call assertions to client redesign

Signed-off-by: Teo <teocns@gmail.com>

* session: remove signals

Signed-off-by: Teo <teocns@gmail.com>

* remove session complexities

Signed-off-by: Teo <teocns@gmail.com>

* Move session tracer init behavior

Signed-off-by: Teo <teocns@gmail.com>

* SessionTelemetryMixin._span

Signed-off-by: Teo <teocns@gmail.com>

* move client/exporters to session/exporters

Signed-off-by: Teo <teocns@gmail.com>

* feat(config): add exporter_endpoint to configuration options

* feat(tracer): update OTLP exporter endpoint configuration

* feat(config): set default exporter endpoint value

* build: update opentelemetry dependencies in pyproject.toml

* test: replace authentication test with OpenAI test

* test_session_config

Signed-off-by: Teo <teocns@gmail.com>

* session(config) param

* test

Signed-off-by: Teo <teocns@gmail.com>

* BatchSpanProcessor

Signed-off-by: Teo <teocns@gmail.com>

* x-alex

Signed-off-by: Teo <teocns@gmail.com>

* Update .cursor/rules

Signed-off-by: Teo <teocns@gmail.com>

* Improve agentops_config, introduce root tests

Signed-off-by: Teo <teocns@gmail.com>

* Consolidate initialization and kwargs passing for AgentOps client (AgentOps-AI#729)

* Consolidate initialization and kwargs passing for AgentOps client (AgentOps-AI#721)

- Add support for custom exporters and exporter endpoints in agentops.init()
- Ensure kwargs are correctly passed downstream to Session and its components
- Update SessionTracer to handle custom exporters and endpoints
- Add tests for custom exporter configuration

Co-Authored-By: Constantin-Doru Teodorescu <teo@agentops.ai>

* Fix syntax errors in agentops/__init__.py

Co-Authored-By: Constantin-Doru Teodorescu <teo@agentops.ai>

* Fix syntax errors and address PR feedback

Co-Authored-By: Constantin-Doru Teodorescu <teo@agentops.ai>

* Fix syntax errors and address PR feedback for custom exporter support

Co-Authored-By: Constantin-Doru Teodorescu <teo@agentops.ai>

* Add validation for configure() function to prevent silently ignoring misspelled parameters

Co-Authored-By: Constantin-Doru Teodorescu <teo@agentops.ai>

* Fix syntax errors in core modules

- Fix import error in client/__init__.py for SessionState
- Fix property decorator error in session/__init__.py
- Fix enum errors in session/state.py with custom StrEnum implementation

Co-Authored-By: Constantin-Doru Teodorescu <teo@agentops.ai>

* feat: add ClassPropertyDescriptor and classproperty function

* Session.current

Signed-off-by: Teo <teocns@gmail.com>

* -test_cusotm_exporter.py

Signed-off-by: Teo <teocns@gmail.com>

* test: add unit tests for agentops.init function

* save

Signed-off-by: Teo <teocns@gmail.com>

* raise NoApiKeyException if no api key

Signed-off-by: Teo <teocns@gmail.com>

* agentops.init() to call agentops._client.init()

Signed-off-by: Teo <teocns@gmail.com>

* +InvalidApiKeyException

Signed-off-by: Teo <teocns@gmail.com>

* config: only raise InvalidApiKey if not TESTING

Signed-off-by: Teo <teocns@gmail.com>

* upgrade tests/fixtures/client.py

Signed-off-by: Teo <teocns@gmail.com>

* tests/fixtures/config.py: +mock_env, etc | Improve clean Config

Signed-off-by: Teo <teocns@gmail.com>

* tests/fixtures/config.py: +marker

Signed-off-by: Teo <teocns@gmail.com>

* tests/fixtures/config.py | fix priority order issues

Signed-off-by: Teo <teocns@gmail.com>

* test_agentops_init

Signed-off-by: Teo <teocns@gmail.com>

---------

Signed-off-by: Teo <teocns@gmail.com>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Constantin-Doru Teodorescu <teo@agentops.ai>
Co-authored-by: Teo <teocns@gmail.com>

* Add CI python-tests from main

Signed-off-by: Teo <teocns@gmail.com>

* AgentOps Decorators Implementation (AgentOps-AI#747)

* Added semconv for Semantic Conventions for AgentOps-specific span types

* Implement decorators for agent, tool, and general span tracking

* Ensure spans are created as children of the current active span

* Refactor semantic conventions: Remove unused attributes and simplify semconv modules

* Remove unused Status and AgentStatus imports from semconv module

* test agentops.decorators (AgentOps-AI#748)

* Added semconv for Semantic Conventions for AgentOps-specific span types

* Implement decorators for agent, tool, and general span tracking

* Ensure spans are created as children of the current active span

* Added comprehensive decorators example and expanded decorator tests.

* Refactor semantic conventions: Remove unused attributes and simplify semconv modules

* Remove unused Status and AgentStatus imports from semconv module

* Remove hardcoded API key from comprehensive decorators example

* bye entelligence-ai-pr-reviews

Signed-off-by: Teo <teocns@gmail.com>

* Don't override endpoint URL on config init.

* Get tests passing (AgentOps-AI#750)

* Allow installing `test` and `dev` dependencies.

* Tox config. Preserve AGENTOPS_API_KEY in tests.

* Allow passing args to tox.

* Suppress otel shutdown log messages in testing.

* Make `test_no_api_key_raises_exception` pass.

* Make `test_invalid_api_key` pass.

* Revert "Allow installing `test` and `dev` dependencies."

This reverts commit 154f6d8.

* Add placholder API key (valid UUID) to unit test config.

* Remove tox.

* Revert "Suppress otel shutdown log messages in testing."

This reverts commit 8e0a950.

* feat: Session ending via `__del__` method and `LiveSpanProcessor` class to ensure span export during exits (AgentOps-AI#742)

* remove cursor rules

* add `inFlightSpanProcessor` to properly export spans

* add use of `InFlightSpanProcessor` to `SessionTracer` class

* add tests

* Simplify Session class by removing setters/getters for status checking

* flush span processor if available

* use thread lock in registry

* remove `force_export` method from processor

* end the span in session

* Integrate session lifecycle and span status tests into test_session.py

* Remove span property usage in favor of direct _span attribute access

* improve tests

* fix context management in multi-threaded scenarios using thread-local storage

* fix comments

* add some more tests

* fix imports

* revert to using `hasattr`

* revert old code

* remove unused code

* remove unused exception

* remove comments

* remove cursor rules

* add `inFlightSpanProcessor` to properly export spans

* add use of `InFlightSpanProcessor` to `SessionTracer` class

* add tests

* Simplify Session class by removing setters/getters for status checking

* flush span processor if available

* use thread lock in registry

* remove `force_export` method from processor

* end the span in session

* Integrate session lifecycle and span status tests into test_session.py

* Remove span property usage in favor of direct _span attribute access

* improve tests

* fix context management in multi-threaded scenarios using thread-local storage

* fix comments

* add some more tests

* fix imports

* revert to using `hasattr`

* revert old code

* remove unused code

* remove unused exception

* remove comments

* remove `hasattr` in `telemetry.py`

* modify to `LiveSpanProcessor`

* Revert "modify to `LiveSpanProcessor`"

This reverts commit 0b80d26.

* modify to `LiveSpanProcessor`

* forward telemetry calls to mixin

* return none if span not present

* use try-except block for errors

* remove `hasattr` in `session.py`

* add global level module fixture

* rename test file

* Revert "remove cursor rules"

This reverts commit 9515be9.

* reset .cursor/rules/testing.mdc

Signed-off-by: Teo <teocns@gmail.com>

* force_export -> force_flush

Signed-off-by: Teo <teocns@gmail.com>

* tests/unit/test_live_span_processor.py: fix isinstance @ threading.Lock

Signed-off-by: Teo <teocns@gmail.com>

---------

Signed-off-by: Teo <teocns@gmail.com>
Co-authored-by: Teo <teocns@gmail.com>

* fix minor test warning not passing

Signed-off-by: Teo <teocns@gmail.com>

* Redesign session registry mixin (AgentOps-AI#762)

* SessionRegistryMixin

Signed-off-by: Teo <teocns@gmail.com>

* agentops.session.session + SessionRegistryMixin, delegate actions to super [start | end]

Signed-off-by: Teo <teocns@gmail.com>

A

Signed-off-by: Teo <teocns@gmail.com>

* test_session_registry

Signed-off-by: Teo <teocns@gmail.com>

---------

Signed-off-by: Teo <teocns@gmail.com>

* Session: migrate telemetry lifecycle into mixin away from session impl

* StateSessionMixin

Signed-off-by: Teo <teocns@gmail.com>

* SessionBase: remove abstractmethod from start/end (linter)

Signed-off-by: Teo <teocns@gmail.com>

* save

Signed-off-by: Teo <teocns@gmail.com>

* SessionStateProperty

Signed-off-by: Teo <teocns@gmail.com>

* SessionStatemixin

Signed-off-by: Teo <teocns@gmail.com>

* Explicit calls to the super start/end methods is one way to make this clearer. Minor fixes. Tests pass.

* I think explicitly named methods is actually clearer.

* Allow passing arbitrary states to Client; parsing happens upstream.

* Mixin doesn't need to inherit from base class.

* Restore abstract decorators.

* Add docstrings

Signed-off-by: Teo <teocns@gmail.com>

* session/README.md

Signed-off-by: Teo <teocns@gmail.com>

* proposal

Signed-off-by: Teo <teocns@gmail.com>

* todos

Signed-off-by: Teo <teocns@gmail.com>

* SDK

Signed-off-by: Teo <teocns@gmail.com>

* +decorators, + spans

Signed-off-by: Teo <teocns@gmail.com>

* tests/unit/sdk

Signed-off-by: Teo <teocns@gmail.com>

* fix: span kind super call

Signed-off-by: Teo <teocns@gmail.com>

* Remove LLMSpan

Signed-off-by: Teo <teocns@gmail.com>

* Pass all tests

Signed-off-by: Teo <teocns@gmail.com>

* New Examples

Signed-off-by: Teo <teocns@gmail.com>

New Examples

Signed-off-by: Teo <teocns@gmail.com>

* delete irrelevant test file

Signed-off-by: Teo <teocns@gmail.com>

* Squash merge tracing-dev-instrumentor into tracing

Signed-off-by: Teo <teocns@gmail.com>

* refactoring tests

Signed-off-by: Teo <teocns@gmail.com>

* Squash merge tracing-use-ao-spanattrs into tracing

Signed-off-by: Teo <teocns@gmail.com>

* add pytest-inline

Signed-off-by: Teo <teocns@gmail.com>

* test_instrumentation: use semconv and better evaluation

Signed-off-by: Teo <teocns@gmail.com>

* Revert "add pytest-inline" - causes weird deps issue

This reverts commit 6e76e25.

* test_instrumentation_errors: use agentops.semconv

Signed-off-by: Teo <teocns@gmail.com>

* Remove legacy session, migrate towards new sdk

Signed-off-by: Teo <teocns@gmail.com>

sdk.context decl

Signed-off-by: Teo <teocns@gmail.com>

* config.auto_start_session = False

Signed-off-by: Teo <teocns@gmail.com>

* simplify config tests

Signed-off-by: Teo <teocns@gmail.com>

* remove init tests

Signed-off-by: Teo <teocns@gmail.com>

* Merge agentops/instrumentation/__init__.py from commit 191e057

* decorators: correctly make use of session span context

Signed-off-by: Teo <teocns@gmail.com>

* test_decorators: +tests for context propagation

Signed-off-by: Teo <teocns@gmail.com>

* delete test_integration

Signed-off-by: Teo <teocns@gmail.com>

* feat: add authenticated exporter support for tracing core

* Make HttpClient store _project_id

Signed-off-by: Teo <teocns@gmail.com>

* agentops.semconv.resource

Signed-off-by: Teo <teocns@gmail.com>

* Client init() -> prefetch JWT -> TracingCore.init -> AuthenticatedOTLPExporter

* draft

Signed-off-by: Teo <teocns@gmail.com>

* fix decorators context mgmt

Signed-off-by: Teo <teocns@gmail.com>

* examples

Signed-off-by: Teo <teocns@gmail.com>

* examples 2

Signed-off-by: Teo <teocns@gmail.com>

* utils

Signed-off-by: Teo <teocns@gmail.com>

* ++ utils

Signed-off-by: Teo <teocns@gmail.com>

* + test span utils

Signed-off-by: Teo <teocns@gmail.com>

* Rewrite testing rules

Signed-off-by: Teo <teocns@gmail.com>

* + testing rule

Signed-off-by: Teo <teocns@gmail.com>

* refactor span tests

Signed-off-by: Teo <teocns@gmail.com>

* isolate instrumentation

Signed-off-by: Teo <teocns@gmail.com>

* reuse instrumentation fixture

Signed-off-by: Teo <teocns@gmail.com>

* cleanup span utils

Signed-off-by: Teo <teocns@gmail.com>

* Deprecate immediate span processor

Signed-off-by: Teo <teocns@gmail.com>

* agent: use semconv

Signed-off-by: Teo <teocns@gmail.com>

* test_spans: update semconv

Signed-off-by: Teo <teocns@gmail.com>

* cleanup test instrumentation

Signed-off-by: Teo <teocns@gmail.com>

* test decorators: move to pytest

Signed-off-by: Teo <teocns@gmail.com>

* migrate test_factory to pytest

Signed-off-by: Teo <teocns@gmail.com>

* test_core: migrate to pytest

Signed-off-by: Teo <teocns@gmail.com>

* test_spanned: migrate to pytest

Signed-off-by: Teo <teocns@gmail.com>

* test_spans: migrate to pytest

Signed-off-by: Teo <teocns@gmail.com>

* Fix "Overriding of current TracerProvider is not allowed"

Signed-off-by: Teo <teocns@gmail.com>

* update basic_usage with agentops.init()

Signed-off-by: Teo <teocns@gmail.com>

* TracingCore.initialize_from_config: accept **kwargs

* Have AgentOps' Client() initialize TracingCore

Signed-off-by: Teo <teocns@gmail.com>

* Remove grpc client

Signed-off-by: Teo <teocns@gmail.com>

* Consolidate auth manager

Signed-off-by: Teo <teocns@gmail.com>

* uv.lock

Signed-off-by: Teo <teocns@gmail.com>

* cleanup

Signed-off-by: Teo <teocns@gmail.com>

* BatchSpanProcessor instead of LiveSpanProcessor

Signed-off-by: Teo <teocns@gmail.com>

* Change test.py with agentops.init()

Signed-off-by: Teo <teocns@gmail.com>

* Improve exporter authentication method

Signed-off-by: Teo <teocns@gmail.com>

* Configure logging in init

Signed-off-by: Teo <teocns@gmail.com>

* flowchart

Signed-off-by: Teo <teocns@gmail.com>

* fix markdown

Signed-off-by: Teo <teocns@gmail.com>

* grouped components better

* semconv

Signed-off-by: Teo <teocns@gmail.com>

* Processor: use basic InFlight

Signed-off-by: Teo <teocns@gmail.com>

* Spanned: use semconv

Signed-off-by: Teo <teocns@gmail.com>

* processor: accept **kwargs

Signed-off-by: Teo <teocns@gmail.com>

* DEBUG logging in pytest

Signed-off-by: Teo <teocns@gmail.com>

* LiveSpanProcessor to use CoreAttribute

Signed-off-by: Teo <teocns@gmail.com>

* Merge spanned into traced

Signed-off-by: Teo <teocns@gmail.com>

* update imports

Signed-off-by: Teo <teocns@gmail.com>

* finalize readme and tests

Signed-off-by: Teo <teocns@gmail.com>

* merge test spanned -> traced

Signed-off-by: Teo <teocns@gmail.com>

* convert to pytest

Signed-off-by: Teo <teocns@gmail.com>

* Squash merge dev-ctx-attach: Improve decorators context management

Signed-off-by: Teo <teocns@gmail.com>

* test auth flow example

Signed-off-by: Teo <teocns@gmail.com>

* delete old examples

Signed-off-by: Teo <teocns@gmail.com>

* new examples

Signed-off-by: Teo <teocns@gmail.com>

* ADD FIXME warning

Signed-off-by: Teo <teocns@gmail.com>

* streamline project_id parsing in Client

Signed-off-by: Teo <teocns@gmail.com>

* Squash merge dev-no-reauth into dev

Signed-off-by: Teo <teocns@gmail.com>

* remove api key param from examples

Signed-off-by: Teo <teocns@gmail.com>

* converters: uuid <> int converters

Signed-off-by: Teo <teocns@gmail.com>

* trace_id: keep as int, add trace_uuid

Signed-off-by: Teo <teocns@gmail.com>

* spans: +logger.debug

Signed-off-by: Teo <teocns@gmail.com>

* remove import for livespanprocessor

Signed-off-by: Teo <teocns@gmail.com>

* remove test spans/traced

Signed-off-by: Teo <teocns@gmail.com>

* change default exporter endpoint

Signed-off-by: Teo <teocns@gmail.com>

* add load dotenv

Signed-off-by: Teo <teocns@gmail.com>

* Agents SDK (AgentOps-AI#800)

* Agents SDK

* Update OpenTelemetry instrumentation to use AgentOps semconv

* Added Agents SDK Examples

* update example adding openai trace

Signed-off-by: Teo <teocns@gmail.com>

* opentelemetry: setup metrics

Signed-off-by: Teo <teocns@gmail.com>

* feat(span_kinds): add SESSION span kind to SpanKind class

* ye (AgentOps-AI#803)

* delete alpha spanning

Signed-off-by: Teo <teocns@gmail.com>

* utility base

Signed-off-by: Teo <teocns@gmail.com>

Base util

Signed-off-by: Teo <teocns@gmail.com>

* add decorators

Signed-off-by: Teo <teocns@gmail.com>

* client.__instance

Signed-off-by: Teo <teocns@gmail.com>

* Chop down decorators to session, agents, operation

Signed-off-by: Teo <teocns@gmail.com>

* Remove old examples

Signed-off-by: Teo <teocns@gmail.com>

* examples

Signed-off-by: Teo <teocns@gmail.com>

* rename to record

Signed-off-by: Teo <teocns@gmail.com>

* simplify decos

Signed-off-by: Teo <teocns@gmail.com>

* basic

Signed-off-by: Teo <teocns@gmail.com>

* fix imports

Signed-off-by: Teo <teocns@gmail.com>

* basic test

Signed-off-by: Teo <teocns@gmail.com>

* draft

Signed-off-by: Teo <teocns@gmail.com>

* uv lock

Signed-off-by: Teo <teocns@gmail.com>

* set current span context to parent

Signed-off-by: Teo <teocns@gmail.com>

* Rename AgentOpsSpanKind -> SpanKind

Signed-off-by: Teo <teocns@gmail.com>

---------

Signed-off-by: Teo <teocns@gmail.com>

* fix imports

Signed-off-by: Teo <teocns@gmail.com>

* spankinds

Signed-off-by: Teo <teocns@gmail.com>

* Noops for compatibility with older implementations. (AgentOps-AI#801)

* Cleanup unused functions. (AgentOps-AI#804)

Co-authored-by: Pratyush Shukla <ps4534@nyu.edu>

* Intercept OTEL log messages and redirect to DEBUG. (AgentOps-AI#805)

Logging interception for otel messages.

Co-authored-by: Pratyush Shukla <ps4534@nyu.edu>

* CrewAI example. (AgentOps-AI#806)

* CrewAI example.

* Remove crew dep installation from crew example.

---------

Co-authored-by: Pratyush Shukla <ps4534@nyu.edu>

* Rename `compat`. Delete `end_all_sessions`.  Default log level.  (AgentOps-AI#808)

* Set default log level. Lower instrumenation log levels. Rename compat to _compat. Remove crew dep installation from crew example.

* Remove unimplemented end_all_sessions.

* Add Streaming support for AgentsInstrumentor and update SpanKind definitions (AgentOps-AI#810)

* Add AgentsInstrumentor and update SpanKind definitions

* Added support for Agents SDK streaming

* Remove monkey patching of shutdown method from AgentsInstrumentor

* Remove debug print statement from AgentsInstrumentor and clean up initialization code

* Refactor logging in AgentsInstrumentor to use warning level for error messages and remove debug statements. This change enhances log clarity by reducing verbosity and ensuring that important warnings are highlighted.

* Added Examples for OpenAI (AgentOps-AI#811)

* Added Examples for OpenAI

* Update OpenAI examples to reference 'trace url' instead of 'session url' for tracking runs in AgentOps.

---------

Co-authored-by: Pratyush Shukla <ps4534@nyu.edu>

* Added Examples for CrewAI (AgentOps-AI#812)

* Added Examples for CrewAI

* Update .gitignore to include .db files and remove obsolete SQLite and binary files from examples/crewai_examples/db directory.

---------

Co-authored-by: Pratyush Shukla <ps4534@nyu.edu>

* Remove instrumentor support for Ollama and Haystack (AgentOps-AI#814)

* remove haystack support

* Delete groq_examples directory

* removed ollama support

* commands (AgentOps-AI#813)

* commands mod

Signed-off-by: Teo <teocns@gmail.com>

* start_span, end_span commands

Signed-off-by: Teo <teocns@gmail.com>

* Move compat to legacy

Signed-off-by: Teo <teocns@gmail.com>

* legacy: start/end session

Signed-off-by: Teo <teocns@gmail.com>

* commands: move session-related to legacy

Signed-off-by: Teo <teocns@gmail.com>

* Move facade to context

Signed-off-by: Teo <teocns@gmail.com>

* Client: auto_start_session configured with legacy

Signed-off-by: Teo <teocns@gmail.com>

* commands: start_span to implement auto init

Signed-off-by: Teo <teocns@gmail.com>

* core: refactor, remove .start_session() methods, improve exceptions

Signed-off-by: Teo <teocns@gmail.com>

* adapt examples

Signed-off-by: Teo <teocns@gmail.com>

---------

Signed-off-by: Teo <teocns@gmail.com>

* refactor: rename uuid_to_hex_int to uuid_to_int16

* add InternalSpanProcessor

Signed-off-by: Teo <teocns@gmail.com>

* Squash merge dev-internal-processor into dev

Signed-off-by: Teo <teocns@gmail.com>

* Added Anthropic examples (AgentOps-AI#817)

* Added Examples for Anthropic

* Refactor Anthropic example notebook by removing verbose debug output and updating execution count to null for cleaner presentation.

---------

Co-authored-by: Pratyush Shukla <ps4534@nyu.edu>

* fix: checks for `dev` before release (AgentOps-AI#818)

* remove unnecessary instrumentations

* move `test_auth_flow` to `tests/integraiton`

* remove cursor rules

* remove incomplete instrumentations from the sdk

* ignore .cursorrules

* remove `autogen` instrumentation

* ruff format code

* ruff format examples

* Added Agents SDK Examples (AgentOps-AI#819)

* Added Agents Example

* remove init from agents examples

---------

Co-authored-by: Pratyush Shukla <ps4534@nyu.edu>

* clean the scripts to fix ruff formatting

* ruff format

---------

Co-authored-by: Dwij <96073160+Dwij1704@users.noreply.github.com>

* add missing anthropic example

* remove test file

* update version

* update `vcrpy` dep version

* ruff ignore E731

* update `uv.lock`

* fix video rendering

---------

Signed-off-by: Teo <teocns@gmail.com>
Co-authored-by: Teo <teocns@gmail.com>
Co-authored-by: Dwij Patel <dwijpatel1704@gmail.com>
Co-authored-by: teocns <59549574+teocns@users.noreply.github.com>
Co-authored-by: devin-ai-integration[bot] <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Constantin-Doru Teodorescu <teo@agentops.ai>
Co-authored-by: Dwij <96073160+Dwij1704@users.noreply.github.com>
Co-authored-by: Travis Dent <tcdent@gmail.com>
0