Send traces

This page covers how to instrument each supported data source so it sends OpenTelemetry traces to Mistral. After traces are flowing, you can explore them in the Trace Explorer.

Sending traces requires only a valid Mistral API key: no feature flag or special role is needed. If an Org Admin disabled observability for the organization, Mistral rejects the traces.

The Mistral SDKs and Vibe Work send no traces until you enable tracing, as described in Enable tracing. Workflows and Managed Agents send traces by default. To block traces for your whole organization, an Org Admin can disable observability.

Coverage by integration

Coverage by integration

IntegrationEnablementLLM callsTool callsAgent spans
Mistral SDK (Python)Opt-in (configure_telemetry)YesManual, via get_telemetry_tracerYes
Mistral SDK (TypeScript)Opt-in (configureTelemetry)YesManual, via getTelemetryTracerYes
WorkflowsAutomatic (on by default; OTEL_ENABLED=false turns it off)YesYesN/A
Vibe WorkOpt-in (workspace toggle in the admin console)YesYesYes
Managed AgentsAutomatic (on by default in the Agents SDK worker)YesYesYes
i
Information

Every source above redacts spans client-side before export by default. See Data redaction to review the policy or change what is masked.

The following Mistral products don't send traces:

  • Vibe Code CLI
  • Vibe Code Web
  • Studio Playground
Enable tracing

Enable tracing

Observability is in Public Preview and the SDK integration changes quickly. Keep the Mistral SDK up to date: the examples need at least mistralai 2.6.0 for Python and @mistralai/mistralai 2.6.1 for TypeScript.

Requirements: Mistral Python SDK with the telemetry extra. The code examples require mistralai[telemetry] >= 2.6.0.

uv add "mistralai[telemetry]"

For more details, see the SDK's observability README and examples.

from mistralai.client import Mistral
from mistralai.extra.observability import configure_telemetry

client = Mistral(api_key="your-api-key")
configure_telemetry(client)

After this call, the SDK creates a span for every API request. Chat, agent and conversation, FIM, embeddings, and OCR spans also carry the model, messages, and token counts.

Add tool spans manually:

Tool calls within your application aren't traced automatically. Use get_telemetry_tracer to add them:

from mistralai.client import Mistral
from mistralai.extra.observability import configure_telemetry, get_telemetry_tracer

client = Mistral(api_key="your-api-key")
configure_telemetry(client)
tracer = get_telemetry_tracer(client, "my-agent")

with tracer.start_as_current_span("invoke_agent"):
    response = client.chat.complete(
        model="mistral-small-latest",
        messages=[{"role": "user", "content": "Search for recent news."}],
    )

    with tracer.start_as_current_span("execute_tool web_search") as tool_span:
        tool_span.set_attribute("gen_ai.operation.name", "execute_tool")
        tool_span.set_attribute("gen_ai.tool.name", "web_search")
        tool_span.set_attribute("gen_ai.tool.call.arguments", "recent news")
        # run your tool here
Disable observability for your organization

Disable observability for your organization

Org Admins can turn off observability for the entire organization. Use this if your organization doesn't want any trace data collected or explored.

To disable observability, open the Observability page in the admin console and turn off the Enable Observability toggle.

Warning

When observability is disabled at the organization level, it applies to every workspace in the organization. Workspace-level settings, such as Conversations tracing, and any instrumentation you configured have no effect until an Org Admin turns the toggle back on.

Verify traces are arriving

Verify traces are arriving

After enabling instrumentation, make one or more requests through your application, then open the Trace Explorer in Studio. Traces typically appear within a few seconds.

If you don't see any traces, check that:

  1. Your organization is on the Enterprise tier, and an Org Admin hasn't disabled observability for the organization.
  2. You called configure_telemetry(client) (or the TypeScript equivalent) before making any API calls.
  3. Your workspace role is Org Admin, Workspace Admin, or Observability Viewer.
FAQ

FAQ