POST /v1/traces, so any OpenTelemetry-instrumented application can export directly — through a collector, or straight from your app using an OTLP exporter.
When to use OTLP
Use this integration when:- Your application already uses OpenTelemetry for instrumentation
- You want to fan out traces to multiple backends (ZeroEval + Datadog, Jaeger, etc.)
- You’re running infrastructure you can’t modify but can route through a collector
- You prefer a vendor-neutral instrumentation layer
If you’re starting fresh, the Python SDK or
TypeScript SDK provide a simpler setup with
automatic LLM instrumentation.
Endpoint Reference
| Header | Value |
|---|---|
Authorization | Bearer YOUR_ZEROEVAL_API_KEY |
Content-Type | application/json or application/x-protobuf |
ExportTraceServiceRequest payload defined in the OTLP specification. Spans are converted to ZeroEval’s internal format — trace IDs, parent-child relationships, attributes, and status are all preserved.
Option 1: OpenTelemetry Collector
Route traces through a collector when you need batching, processing, or multi-destination fan-out.Collector Configuration
Createotel-collector-config.yaml:
Run with Docker Compose
Run with Kubernetes
Full Kubernetes manifest
Full Kubernetes manifest
Option 2: Direct from Python
Export OTLP traces directly from your Python application without a collector. Use theZeroEvalOTLPProvider included in the SDK, or configure a standard OTLPSpanExporter.
Using ZeroEvalOTLPProvider
Using standard OTLPSpanExporter
Option 3: Direct from Node.js
Attribute Mapping
ZeroEval maps standard OpenTelemetry span attributes to its internal format:| OTLP Attribute | ZeroEval Field | Notes |
|---|---|---|
span.name | name | Span name |
span.kind | kind | Mapped to generic, llm, etc. |
span.status | status | ok, error, unset |
span.start_time | started_at | Nanosecond timestamp converted to ISO 8601 |
span.end_time | ended_at | Nanosecond timestamp converted to ISO 8601 |
span.trace_id | trace_id | Hex-encoded trace ID |
span.parent_span_id | parent_span_id | Hex-encoded span ID |
span.attributes.* | attributes | All attributes preserved |
resource.service.name | Service identification | Used for grouping |
LLM Spans
To get LLM-specific features (cost calculation, token tracking), set these attributes on your spans:| Attribute | Description |
|---|---|
llm.provider or gen_ai.system | Provider name (openai, anthropic, etc.) |
llm.model or gen_ai.request.model | Model identifier |
llm.input_tokens or gen_ai.usage.prompt_tokens | Input token count |
llm.output_tokens or gen_ai.usage.completion_tokens | Output token count |
Sessions
Attach session context to your OTLP spans via attributes:| Attribute | Description |
|---|---|
zeroeval.session.id | Session ID for grouping traces |
zeroeval.session.name | Human-readable session name |
ZeroEvalOTLPProvider stamps these automatically when you configure a session via environment variables (ZEROEVAL_SESSION_ID, ZEROEVAL_SESSION_NAME).