OpenLLMetry
OpenLLMetry integration for sending observability data to Arize with OpenInference semantic conventions
Overview
OpenLLMetry is an open-source observability package for LLM applications that provides automatic instrumentation for popular LLM frameworks and providers. This integration enables you to send OpenLLMetry traces to Arize using OpenInference semantic conventions.
Integration Type
Tracing Integration
Key Features
Automatic instrumentation for 20+ LLM providers and frameworks
Seamless conversion to OpenInference semantic conventions
Real-time trace collection and analysis in Arize
Support for complex LLM workflows and chains
Prerequisites
Arize account with Space ID and API Key
Python 3.8 or higher
OpenLLMetry and OpenTelemetry packages
Target LLM provider credentials (e.g., OpenAI API key)
Installation
Install the required packages:
For specific LLM providers, install their respective instrumentations:
Quick Start
Download the OpenInference Span Processor
Download the script that converts Traceloop spans to OpenInference format:
Mac/Linux:
Windows (PowerShell):
Basic Setup
The OpenLLMetryToOpenInferenceSpanProcessor
is a custom span processor that maps OpenLLMetry trace attributes to OpenInference semantic conventions.
Complete Example
Here's a complete working example with OpenAI:

Configuration Options
Environment Variables
Set up your environment variables for seamless configuration:
Supported LLM Providers
OpenLLMetry supports automatic instrumentation for:
LLM Providers: OpenAI, Anthropic, Azure OpenAI, Cohere, Replicate, Hugging Face, and more
Vector Databases: Pinecone, ChromaDB, Weaviate, Qdrant
Frameworks: LangChain, LlamaIndex, Haystack, CrewAI
Databases: Redis, SQL databases
For a complete list, see the OpenLLMetry documentation.
OpenInference Semantic Conventions
When traces are processed through the OpenInference converter, the following attributes are standardized:
Input/Output Attributes
input.mime_type
: Set to "application/json"input.value
: JSON string of prompt and parametersoutput.value
: LLM response contentoutput.mime_type
: Response content type
LLM-Specific Attributes
llm.model_name
: The model identifierllm.provider
: The LLM provider namellm.token_count.prompt
: Input token countllm.token_count.completion
: Output token countopeninference.span.kind
: Set to "LLM"
Message Attributes
llm.input_messages
: Array of input messagesllm.output_messages
: Array of output messagesMessage roles: system, user, assistant, function
Troubleshooting
Common Issues
Missing Traces
If traces aren't appearing in Arize:
Verify your Space ID and API Key are correct
Check network connectivity to
otlp.arize.com:443
Ensure the OpenInference converter is properly configured
Enable debug logging to see trace export attempts
Incorrect Span Format
If spans appear malformed:
Verify the OpenLLMetryToOpenInferenceSpanProcessor is added before the OTLP exporter
Check that all required OpenInference attributes are present
Validate the span processor order in your configuration
Performance Issues
For high-latency applications:
Use asynchronous span processing
Adjust batch size and timeout settings
Consider sampling strategies for high-volume scenarios
Debug Mode
Enable debug logging to troubleshoot issues:
Multi-Provider Setup
Configure multiple LLM providers simultaneously:
Support
Last updated
Was this helpful?