Skip to main content

OpenTelemetry instrumentation for Mistral AI

Project description

MistralAI OpenTelemetry Integration

Overview

This integration provides support for using OpenTelemetry with the MistralAI framework. It enables tracing and monitoring of applications built with MistralAI.

Installation

  1. Install traceAI MistralAI
pip install traceAI-mistralai

Set Environment Variables

Set up your environment variables to authenticate with FutureAGI

import os

os.environ["FI_API_KEY"] = FI_API_KEY
os.environ["FI_SECRET_KEY"] = FI_SECRET_KEY
os.environ["MISTRAL_API_KEY"] = MISTRAL_API_KEY

Quickstart

Register Tracer Provider

Set up the trace provider to establish the observability pipeline. The trace provider:

from fi_instrumentation import register
from fi_instrumentation.fi_types import ProjectType

trace_provider = register(
    project_type=ProjectType.OBSERVE,
    project_name="mistralai_app"
)

Configure MistralAI Instrumentation

Instrument the MistralAI client to enable telemetry collection. This step ensures that all interactions with the MistralAI SDK are tracked and monitored.

from traceai_mistralai import MistralAIInstrumentor

MistralAIInstrumentor().instrument(tracer_provider=trace_provider)

Create MistralAI Components

Set up your MistralAI client with built-in observability.

from mistralai import Mistral

client = Mistral(api_key=os.environ["MISTRAL_API_KEY"])

if __name__ == "__main__":
    response = client.agents.complete(
        agent_id="agent_id",
        messages=[
            {"role": "user", "content": "plan a vacation for me in Tbilisi"},
        ],
    )
    print(response)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

traceai_mistralai-0.1.5.tar.gz (10.6 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

traceai_mistralai-0.1.5-py3-none-any.whl (15.2 kB view details)

Uploaded Python 3

traceai_mistralai-0.1.5-1-py3-none-any.whl (15.2 kB view details)

Uploaded Python 3

File details

Details for the file traceai_mistralai-0.1.5.tar.gz.

File metadata

  • Download URL: traceai_mistralai-0.1.5.tar.gz
  • Upload date:
  • Size: 10.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.0 CPython/3.13.0 Darwin/24.1.0

File hashes

Hashes for traceai_mistralai-0.1.5.tar.gz
Algorithm Hash digest
SHA256 f826894f9eab4cb08e1e5da420622ff11af269671615f7d7f74aebd2d0eb9fe3
MD5 1616032148d6a9b5b517bcdc9c78320e
BLAKE2b-256 ab29d3c539bcd5d4291581d46f452cbdc7f355aba024c45d2f161525c3136ad2

See more details on using hashes here.

File details

Details for the file traceai_mistralai-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: traceai_mistralai-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 15.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.0 CPython/3.13.0 Darwin/24.1.0

File hashes

Hashes for traceai_mistralai-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 7d0d5a811ec121df0b34445ef48fe0e2a4adfcdca608765fdaf4b141415eb730
MD5 695feb96ae213eb5e31f9064d5f1fdc6
BLAKE2b-256 21d34a7432efa3c6d3505310274a820dc11583289d4634d2002dddd6a2ec05f0

See more details on using hashes here.

File details

Details for the file traceai_mistralai-0.1.5-1-py3-none-any.whl.

File metadata

File hashes

Hashes for traceai_mistralai-0.1.5-1-py3-none-any.whl
Algorithm Hash digest
SHA256 4bbfd4e382f85ac17ecd2fd5629ec423a1f176243a973cc19aad695a23421a42
MD5 99d1cf50cbe0b10f7883744579503e6a
BLAKE2b-256 e29821b003bbbbcb15792c8b7bc95f9269d1d4331d372effa30e1396d3c864c1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page