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
| Integration | Enablement | LLM calls | Tool calls | Agent spans |
|---|---|---|---|---|
| Mistral SDK (Python) | Opt-in (configure_telemetry) | Yes | Manual, via get_telemetry_tracer | Yes |
| Mistral SDK (TypeScript) | Opt-in (configureTelemetry) | Yes | Manual, via getTelemetryTracer | Yes |
| Workflows | Automatic (on by default; OTEL_ENABLED=false turns it off) | Yes | Yes | N/A |
| Vibe Work | Opt-in (workspace toggle in the admin console) | Yes | Yes | Yes |
| Managed Agents | Automatic (on by default in the Agents SDK worker) | Yes | Yes | Yes |
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
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 hereDisable 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.
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
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:
- Your organization is on the Enterprise tier, and an Org Admin hasn't disabled observability for the organization.
- You called
configure_telemetry(client)(or the TypeScript equivalent) before making any API calls. - Your workspace role is Org Admin, Workspace Admin, or Observability Viewer.