/claim #2456 Fixes: #2456

  • I have added tests that cover my changes.
  • If adding a new instrumentation or changing an existing one, I’ve added screenshots from some observability platform showing the change.
  • PR name follows conventional commits format: feat(instrumentation): ... or fix(instrumentation): ....
  • (If applicable) I have updated the documentation accordingly.

Description

This PR adds event-based tracking implementation across multiple providers while maintaining backward compatibility with the legacy attribute-based approach.

Completed Implementations:

  • ✅ Anthropic
  • ✅ Bedrock
  • ✅ Cohere
  • ✅ Google GenerativeAI
  • ✅ Groq
  • ✅ Langchain
  • ✅ LlamaIndex
  • ✅ MistralAI
  • ✅ Ollama
  • ✅ Replicate

Pending Implementations:

  • 🔄 SageMaker
  • 🔄 Together
  • 🔄 Transformers
  • 🔄 VertexAI
  • 🔄 WatsonX

Key Changes:

  1. Added event-based configuration with use_legacy_attributes support
  2. Implemented event utilities for:
    • Prompts
    • Completions
    • Embeddings (where applicable)
    • Tool/Function calls (where applicable)
  3. Added comprehensive test coverage for event emission
  4. Added support for both sync and async clients
  5. Added streaming support where applicable
  6. Maintained backward compatibility with legacy mode

Each provider implementation includes:

  • Event utilities (events.py)
  • Configuration updates (config.py)
  • Core instrumentation updates (__init__.py)
  • Comprehensive test coverage (test_events.py)

Claim

Total prize pool $1,500
Total paid $0
Status Pending
Submitted January 22, 2025
Last updated January 22, 2025

Contributors

DA

David Anyatonwu

@onyedikachi-david

100%

Sponsors

TR

Traceloop (YC W23)

@traceloop

$1,500