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.
Tracing is off by default. No traces are sent until you enable it for each source, as described in Enable tracing. 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 (OTEL_ENABLED=true on the service) | Yes | Yes | N/A |
| Vibe Work | Opt-in (admin toggle in Studio) | 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
Requirements: Mistral Python SDK with the telemetry extra. The code examples require mistralai[telemetry] >= 2.4.13.
Observability is in Private Preview and the SDK integration changes quickly, so we recommend using the latest SDK version.
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 traces all LLM calls, embeddings, agent operations, FIM completions, and OCR requests automatically.
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.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 Observability toggle.
When observability is disabled at the organization level, it applies to every workspace in the organization. Workspace-level settings, such as Conversation 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 API key belongs to an Enterprise workspace with Observability enabled, 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.