How traceloop/openllmetry works
Main Components
a. Core Components:
• OpenTelemetry SDK Integration Layer
• Traceloop SDK
• Instrumentation Modules
• Telemetry Collection System
• Export Pipeline
b. Integration Components:
• LLM Provider Instrumentations
• Vector DB Instrumentations
• Framework Instrumentations
• Observability Platform Connectors
┌─────────────────────────────────────────────────────────────┐
• Client Applications │
• ┬─────────────────────────────────┘
• ↓
┌─────────────────────────────────────────────────────────────┐
• Traceloop SDK Layer │
• ┌─────────────┐ ┌──────────────┐ ┌───────────────────┐ │
• Config │ │ Decorators │ │ Context Manager │ │
• ┘ └──────────────┘ └───────────────────┘ │
• ┬─────────────────────────────────┘
• ↓
┌─────────────────────────────────────────────────────────────┐
• Instrumentation Layer │
• ┌─────────────┐ ┌──────────────┐ ┌───────────────────┐ │
• LLM Providers│ │ Vector DBs │ │ Frameworks │ │
• ┘ └──────────────┘ └───────────────────┘ │
• ┬─────────────────────────────────┘
• ↓
┌─────────────────────────────────────────────────────────────┐
• OpenTelemetry Core │
• ┌─────────────┐ ┌──────────────┐ ┌───────────────────┐ │
• Traces │ │ Metrics │ │ Context │ │
• ┘ └──────────────┘ └───────────────────┘ │
• ┬─────────────────────────────────┘
• ↓
┌─────────────────────────────────────────────────────────────┐
• Export Backends │
• ┌─────────────┐ ┌──────────────┐ ┌───────────────────┐ │
• Datadog │ │ Honeycomb │ │ Other Services │ │
• ┘ └──────────────┘ └───────────────────┘ │
• ┘
Key Relationships
• Bidirectional flow between SDK and instrumentations
• One-way flow from instrumentations to OpenTelemetry core
• Data flow from OpenTelemetry to export backends
• Control flow from client applications through the stack
Important Details
• Supported LLM providers (OpenAI, Anthropic, etc.)
• Supported Vector DBs (Chroma, Pinecone, etc.)
• Framework support (LangChain, LlamaIndex)
• Export destinations (Datadog, Honeycomb, etc.)
• Telemetry collection path (optional component)
Implementation Notes
• Numbered sequence indicators for key flows
• Error handling paths