November 2026 release is live Read More
Breadcrumbs

Connect OpenTelemetry to Mavvrik

Send traces from agents already instrumented with OpenTelemetry to Mavvrik, and see cost and usage per agent. No Mavvrik SDK is needed.

Using OpenRouter? Follow Connect OpenRouter agents instead.

Before you start

  • Your agents emit OpenTelemetry traces for their model calls.

  • Your app or OpenTelemetry Collector can export OTLP over HTTP (http/protobuf) with custom headers. Supported protocols

  • You can create an agent connection in Mavvrik.

Step 1. Register the connection

  1. In Mavvrik, go to Agents and select + Agent.

  2. Under Others, select OpenTelemetry.

  3. Enter a Connection Name, for example prod-agents, and select Next.

image-20261116-035313.png
mvk-2-setup.png

Step 2. Copy the endpoint and headers

  1. Copy the Endpoint and the three Headers. The Authorization value is a secret key; store it securely.

  2. In Agent ID attribute, enter the attribute that names the agent in your traces. If you set mvk.agent_id as a resource attribute, leave it empty. How Mavvrik identifies agents

  3. Select Register.

mvk-3-endpoint.png
mvk-4-headers.png

Step 3. Send traces to Mavvrik

Use one of the following.

From your application (OpenTelemetry SDK)

Bash
OTEL_EXPORTER_OTLP_ENDPOINT=<endpoint>
OTEL_EXPORTER_OTLP_PROTOCOL=http/protobuf
OTEL_EXPORTER_OTLP_HEADERS=x-tenant-id=<tenant-id>,Authorization=Bearer%20<api-key>,x-mvk-connection-id=<connection-id>

From an OpenTelemetry Collector

Add Mavvrik as an exporter. Your existing exporters keep receiving the same traces.

YAML
exporters:
  otlphttp/mavvrik:
    endpoint: <endpoint>
    headers:
      x-tenant-id: "<tenant-id>"
      Authorization: "Bearer <api-key>"
      x-mvk-connection-id: "<connection-id>"

service:
  pipelines:
    traces:
      receivers: [otlp]
      exporters: [otlphttp/mavvrik]

Reload the Collector and check its logs for export errors.

Step 4. Check your data

  1. Run your agents so they make model calls.

  2. Go to Agents → Others, open the connection and confirm your agents are listed by name.

  3. Open Agent Cost and confirm LLM calls, tokens and cost appear.

Data usually appears within an hour, and always within 24 hours. Something missing? See Troubleshooting.

Learn more