Overview

Supported Trace Formats
The plugin supports multiple trace formats to match your observability platform:| Format | Description | Use Case | Status |
|---|---|---|---|
genai_extension | OpenTelemetry GenAI semantic conventions | Recommended - Standard OTel format with rich LLM metadata | ✅ Released |
vercel | Vercel AI SDK format | For Vercel AI SDK compatibility | 🔄 Coming soon |
open_inference | Arize OpenInference format | For Arize Phoenix and OpenInference tools | 🔄 Coming soon |
Configuration
Required Fields
| Field | Type | Required | Description |
|---|---|---|---|
service_name | string | ❌ No | Service name to be used for tracing, defaults to bifrost |
collector_url | string | ✅ Yes | OTLP collector endpoint URL |
trace_type | string | ✅ Yes | One of: genai_extension, vercel, open_inference |
protocol | string | ✅ Yes | Transport protocol: http or grpc |
headers | object | ❌ No | Custom headers for authentication (supports env.VAR_NAME) |
tls_ca_cert | string | ❌ No | File path to client CA certificate for TLS. Optional. Works with both gRPC and HTTP protocol |
Environment Variable Substitution
Headers support environment variable substitution using theenv. prefix:
Resource Attributes
The plugin supports the standardOTEL_RESOURCE_ATTRIBUTES environment variable. Any attributes defined in this variable will be automatically attached to every span emitted by the plugin.
- Environment identification - Distinguish between production, staging, and development traces
- Service versioning - Track which version of your service generated the trace
- Team attribution - Tag traces with team ownership for filtering and alerting
- Custom metadata - Add any key-value pairs relevant to your observability needs
Setup
- UI
- Go SDK
- config.json

Quick Start with Docker
Get started quickly with a complete observability stack using the included Docker Compose configuration:- OTel Collector - Receives traces on ports 4317 (gRPC) and 4318 (HTTP)
- Tempo - Distributed tracing backend
- Prometheus - Metrics collection
- Grafana - Visualization dashboard
http://localhost:3000 (default credentials: admin/admin)

Popular Platform Integrations
- Grafana Cloud
- Datadog
- New Relic
- Honeycomb
- Langfuse
- Self-Hosted
Captured Data
Each trace includes comprehensive LLM operation metadata following OpenTelemetry semantic conventions:Span Attributes
- Span Name: Based on request type (
gen_ai.chat,gen_ai.text,gen_ai.embedding, etc.) - Service Info:
service.name=bifrost,service.version - Provider & Model:
gen_ai.provider.name,gen_ai.request.model
Request Parameters
- Temperature, max_tokens, top_p, stop sequences
- Presence/frequency penalties
- Tool configurations and parallel tool calls
- Custom parameters via
ExtraParams
Input/Output Data
- Complete chat history with role-based messages
- Prompt text for completions
- Response content with role attribution
- Tool calls and results
Performance Metrics
- Token usage (prompt, completion, total)
- Cost calculations in dollars
- Latency and timing (start/end timestamps)
- Error details with status codes
Example Span

Supported Request Types
The OTel plugin captures all Bifrost request types:- Chat Completion (streaming and non-streaming) →
gen_ai.chat - Text Completion (streaming and non-streaming) →
gen_ai.text - Embeddings →
gen_ai.embedding - Speech Generation (streaming and non-streaming) →
gen_ai.speech - Transcription (streaming and non-streaming) →
gen_ai.transcription - Responses API →
gen_ai.responses
Protocol Support
HTTP (OTLP/HTTP)
Uses HTTP/1.1 or HTTP/2 with JSON or Protobuf encoding:gRPC (OTLP/gRPC)
Uses gRPC with Protobuf encoding for lower latency:Advanced Features
Automatic Span Management
- Spans are tracked with a 20-minute TTL using an efficient sync.Map implementation
- Automatic cleanup prevents memory leaks for long-running processes
- Handles streaming requests with accumulator for chunked responses
Async Emission
All span emissions happen asynchronously in background goroutines:Streaming Support
The plugin accumulates streaming chunks and emits a single complete span when the stream finishes, providing accurate token counts and costs.Environment Variable Security
Sensitive credentials never appear in config files:OTEL_API_KEY from the environment at runtime.
When to Use
OTel Plugin
Choose the OTel plugin when you:- Have existing OpenTelemetry infrastructure
- Need to correlate LLM traces with application traces
- Require compliance with enterprise observability standards
- Want vendor flexibility (switch backends without code changes)
- Need multi-service distributed tracing
vs. Built-in Observability
Use Built-in Observability for:- Local development and testing
- Simple self-hosted deployments
- No external dependencies
- Direct database access to logs
vs. Maxim Plugin
Use the Maxim Plugin for:- Advanced LLM evaluation and testing
- Prompt engineering and experimentation
- Team collaboration and governance
- Production monitoring with alerts
- Dataset management and curation
Troubleshooting
Connection Issues
Verify collector is reachable:Missing Traces
Check Bifrost logs for emission errors:Authentication Failures
Verify environment variables are set:Next Steps
- Built-in Observability - Local logging for development
- Maxim Plugin - Advanced LLM evaluation and monitoring
- Telemetry - Prometheus metrics and dashboards

