Quick setup
Point your OpenTelemetry exporter at Avido by setting three environment variables:You can find your Application ID and API key in the Avido dashboard under Settings > API Keys.
Disabling instrumentation: If
OTEL_EXPORTER_OTLP_ENDPOINT is not set, the Avido
OpenTelemetry integration is automatically disabled. This lets you turn tracing on and off
per environment without code changes.Sending traces
Once your exporter is configured, traces are sent automatically by your instrumentation library. You can also send an OTLP payload manually:cURL
/v0/ingest endpoint.
How spans are mapped
Avido reads theopeninference.span.kind attribute on each span and converts it into the
matching Avido step type:
Spans without a recognised
openinference.span.kind are stored as log steps so nothing is lost.
Agentic trace support:
AGENT and CHAIN spans are mapped to group steps, preserving
the hierarchical structure of agentic workflows. This means multi-turn agent loops, tool-calling
chains, and orchestration flows are displayed with their full parent-child relationships in the
Avido trace viewer.Attribute reference
The tables below list every attribute Avido extracts from spans. Any attributes not listed here are preserved in the step’smetadata field.
LLM spans
Tool spans
Group spans (Agent / Chain)
Retriever spans
Common attributes
Linking test runs:
avido.test.id is a custom Avido attribute — it is not part of
the OpenInference spec. If you’re running Avido tests via webhooks, set this
span attribute to the testId from the webhook payload so the trace is automatically
connected to the test run and evaluation results are linked.Error and status tracking
Avido maps the OTel span status to structured error fields on each step:
When a span has
status.code = 2 (ERROR):
- The step’s
statusis set toerror - The span’s
status.messageis stored in the step’serrorfield - The numeric status code is preserved in
statusCode
Cost tracking
Avido automatically computes the cost of LLM steps when token counts are present.How it works
- When an LLM span includes
llm.token_count.promptandllm.token_count.completion, Avido looks up the model in the Model Pricing table (configurable in your dashboard). - Cost is computed as:
(promptTokens x inputCostPer1kTokens + completionTokens x outputCostPer1kTokens) / 1000 - The resulting
costAmountis stored on the step.
Trace-level aggregation
After all steps are ingested, Avido computes summary fields on the trace:
These pre-computed fields power the trace list view and enable filtering by cost, duration,
and error state without scanning individual steps.
Set up Model Pricing in the Avido dashboard or via the API to enable automatic cost
computation. If no pricing entry exists for a model, the step is ingested without a cost value.
Trace structure
Each OTLP batch creates one trace in Avido:- If a root span (no
parentSpanId) is present, it becomes the trace container. Itssession.idorgen_ai.conversation.idattribute is used as the trace’sreferenceId. - If no root span exists, the first span in the batch is used.
- All spans become steps nested under the trace, preserving parent-child relationships
via
parentSpanId. - Timing fields (
startTimeUnixNano,endTimeUnixNano) are stored as step timestamps with millisecond duration.
Understanding testId and traceId
Two IDs can appear on OTEL traces — here’s what each one does:
avido.test.id links the trace to an Avido test run for evaluation. The OTLP traceId groups
spans together. They serve different purposes — do not confuse them.Agentic trace patterns
Avido is designed to capture complex agentic workflows. Here’s how common patterns map through the OTEL converter:Multi-turn tool-calling agent
Orchestration chain
Error handling in agents
When a span hasstatus.code = 2, the step is marked as error. This is useful for tracking
retry patterns:
Vercel AI SDK
If you’re using the Vercel AI SDK, Avido also recognises its telemetry attributes as fallbacks:Next steps
- View your traces in the Traces page in the dashboard.
- Set up Model Pricing in the dashboard to enable automatic cost tracking.
- Compare with the SDK-based ingestion approach if you need finer control.
- Explore the OpenInference instrumentation libraries for ready-made integrations.
- Check the full endpoint schema in API > Ingestion.