opentelemetry-instrumentation-mistralai
OpenTelemetry Mistral AI instrumentation
What it is and what it does
This package is an OpenTelemetry instrumentation plugin that automatically intercepts and traces calls made through the official Mistral AI Python library. Once initialized with a single call to `MistralAiInstrumentor().instrument()`, it captures request and response data as span attributes, giving you visibility into what your LLM application is sending to and receiving from Mistral's endpoints.
By default, it logs prompts, completions, and embeddings to trace spans—useful for debugging and understanding model behavior. However, you can disable this content logging by setting the `TRACELOOP_TRACE_CONTENT` environment variable to `false` if you need to protect sensitive user data or reduce trace size. The instrumentation integrates with your existing OpenTelemetry collector setup, so traces flow into whatever backend you're already using.
Use it for:
- Debug Mistral API calls in development by inspecting prompts and responses in your trace backend
- Monitor production LLM applications to detect latency, errors, or unexpected model behavior
- Correlate Mistral API calls with other application traces for end-to-end request tracing
- Audit what data is being sent to Mistral for compliance or privacy reviews
- Evaluate model output quality by reviewing completions stored in trace spans
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Automatically captures and traces calls to the Mistral AI API using OpenTelemetry, recording request and response data as span attributes for observability and debugging.
Yes, if you are already using OpenTelemetry and the Mistral AI library. Installation is straightforward, maintenance is active, and there are no known vulnerabilities. The permissive Apache-2.0 license poses no barrier. The main consideration is whether your observability stack is already OpenTelemetry-based; if not, you would need to set that up first. Privacy-conscious teams should enable `TRACELOOP_TRACE_CONTENT=false` to avoid logging sensitive prompts.
Install
opentelemetry-instrumentation-mistralai on PyPI
pip
pip install opentelemetry-instrumentation-mistralaiuv
uv add opentelemetry-instrumentation-mistralaipoetry
poetry add opentelemetry-instrumentation-mistralaiInstalling opentelemetry-instrumentation-mistralai
Before you install
Low friction: pure Python wheel with four stable OpenTelemetry dependencies. Actively maintained as of 2026-08-10 with recent release history.
License in practice
Apache-2.0 permissive license allows use in most projects without significant restrictions.
Quickstart
pip install opentelemetry-instrumentation-mistralai
from opentelemetry.instrumentation.mistralai import MistralAiInstrumentor
MistralAiInstrumentor().instrument()
Requires Python 3.10 or later. Mistral AI library must be installed separately for instrumentation to attach to actual API calls.
Verify before relying
- Whether instrumentation works with all Mistral AI endpoints or only a subset
- Performance overhead of tracing on typical Mistral API call latency
- Compatibility with specific versions of the Mistral AI library
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (<4,>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 4 — opentelemetry-api, opentelemetry-instrumentation, opentelemetry-semantic-conventions-ai, opentelemetry-semantic-conventions |
| Maintenance | actively maintained — 4 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 6,833,585/month — #1,838 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: opentelemetry_instrumentation_mistralai-0.62.3-py3-none-any.whl
Tags
More Monitoring packages
Wraps any iterable to display a real-time…
copyleft · top 100 on PyPI
opentelemetry-semantic-conventionsProvides generated Python code for…
permissive · top 100 on PyPI
opentelemetry-sdkProvides the reference implementation of the…
permissive · top 100 on PyPI
opentelemetry-apiProvides the abstract API and interfaces for…
permissive · top 100 on PyPI
opentelemetry-exporter-otlp-proto-httpExports OpenTelemetry observability data to an…
permissive · top 1,000 on PyPI
opentelemetry-instrumentationProvides automatic instrumentation commands and…
permissive · top 1,000 on PyPI
opentelemetry-instrumentation-openaiCaptures traces of OpenAI API calls (prompts,…
permissive · top 5,000 on PyPI
opentelemetry-instrumentation-sagemakerAutomatically captures traces of Amazon…
permissive · top 5,000 on PyPI
opentelemetry-instrumentation-vertexaiAutomatically captures traces of VertexAI API…
permissive · top 5,000 on PyPI
mistralai-workflowsMistral Workflows is a Python SDK for building…
permissive · top 15,000 on PyPI
mistralaiPython client SDK for the Mistral AI API,…
unclear · top 1,000 on PyPI
literalaiLiteralai is a Python SDK for observability in…
permissive · top 15,000 on PyPI
opentelemetry-instrumentation-groqAutomatically captures traces of Groq SDK API…
permissive · top 5,000 on PyPI
opentelemetry-instrumentation-writerAutomatically traces calls to Writer's API…
permissive · top 5,000 on PyPI
opentelemetry-instrumentation-openai-agentsAdds distributed tracing to OpenAI Agents…
permissive · top 5,000 on PyPI
opentelemetry-instrumentation-togetherAutomatically traces calls to Together AI's API…
permissive · top 5,000 on PyPI