Skip to content

Conversation

@dot-agi
Copy link
Member

@dot-agi dot-agi commented Mar 13, 2025

🚀 AgentOps v0.4.0

🌟 Overview

We're thrilled to announce the release of AgentOps v0.4.0, featuring a complete redesign built on OpenTelemetry! This major architectural shift enables more robust instrumentation, standardized metrics collection, and enhanced interoperability with the broader observability ecosystem.

🏗️ Key Architectural Changes

📊 OpenTelemetry Core Integration

  • ✅ Replaced proprietary event system with OpenTelemetry's trace, metrics, and logging components
  • ✅ Implemented OTLP exporters for standardized data transmission
  • ✅ Added support for distributed tracing with proper context propagation
  • ✅ Integrated with OpenTelemetry's resource and semantic convention systems

🔌 Instrumentation Framework

  • ✅ Created custom instrumentors for popular AI frameworks:
    • OpenAI SDK (v0 and v1 API support)
    • Anthropic SDK (including streaming support)
    • CrewAI framework
    • Agents SDK with comprehensive span capture
  • ✅ Implemented auto-instrumentation capabilities that can be enabled at runtime
  • ✅ Added support for streaming operations with proper span lifecycle management

🧩 Client Architecture

  • ✅ Redesigned client architecture with clear separation of concerns
  • ✅ Implemented proper resource attribution and semantic conventions
  • ✅ Added internal span processors for enhanced data processing

✨ New Features

🌊 Streaming Support

Full instrumentation for streaming LLM responses with accurate token counting and latency measurements

📈 Enhanced Metrics Collection

  • Token usage histograms
  • Latency measurements
  • Request/response counters
  • Error rate tracking

⚙️ Internal Span Processing

  • Custom span processors for enriching spans with additional context
  • Proper handling of span relationships and hierarchies

🛡️ Improved Error Handling

  • Fail-safe operation modes
  • Graceful degradation when services are unavailable
  • Comprehensive error logging

🤝 Framework-Specific Integrations

  • CrewAI task and agent tracking
  • OpenAI assistants API support
  • Anthropic Claude streaming support

🔄 Backward Compatibility

While this is a complete redesign, we've maintained backward compatibility through:

  • 🔙 Legacy module that maps old API calls to new OpenTelemetry-based implementations
  • 🔍 Automatic detection and adaptation to client usage patterns
  • 📝 Maintaining the same public API surface while changing the implementation

📚 Documentation & Examples

  • Updated examples demonstrating the new OpenTelemetry-based approach
  • Comprehensive documentation reflecting the architectural changes
  • Migration guides for users of previous versions

Signed-off-by: Teo <[email protected]>
Signed-off-by: Teo <[email protected]>
Signed-off-by: Teo <[email protected]>
Signed-off-by: Teo <[email protected]>
Signed-off-by: Teo <[email protected]>
Signed-off-by: Teo <[email protected]>
Dwij1704 and others added 13 commits March 13, 2025 03:53
…nitions (#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

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

---------

Co-authored-by: Pratyush Shukla <[email protected]>
* 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 <[email protected]>
* remove haystack support

* Delete groq_examples directory

* removed ollama support
* commands mod

Signed-off-by: Teo <[email protected]>

* start_span, end_span commands

Signed-off-by: Teo <[email protected]>

* Move compat to legacy

Signed-off-by: Teo <[email protected]>

* legacy: start/end session

Signed-off-by: Teo <[email protected]>

* commands: move session-related to legacy

Signed-off-by: Teo <[email protected]>

* Move facade to context

Signed-off-by: Teo <[email protected]>

* Client: auto_start_session configured with legacy

Signed-off-by: Teo <[email protected]>

* commands: start_span to implement auto init

Signed-off-by: Teo <[email protected]>

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

Signed-off-by: Teo <[email protected]>

* adapt examples

Signed-off-by: Teo <[email protected]>

---------

Signed-off-by: Teo <[email protected]>
* 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 <[email protected]>
* 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 (#819)

* Added Agents Example

* remove init from agents examples

---------

Co-authored-by: Pratyush Shukla <[email protected]>

* clean the scripts to fix ruff formatting

* ruff format

---------

Co-authored-by: Dwij <[email protected]>
@dot-agi dot-agi self-assigned this Mar 13, 2025
@dot-agi dot-agi marked this pull request as ready for review March 13, 2025 09:56
@areibman areibman merged commit ef381d2 into main Mar 13, 2025
3 of 9 checks passed
@areibman areibman deleted the dev branch March 13, 2025 11:23
@dot-agi dot-agi restored the dev branch March 13, 2025 11:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants