mistral-observability

Featured

Set up comprehensive observability for Mistral AI with metrics, traces, and alerts. Use when implementing monitoring for Mistral AI operations, setting up dashboards, or configuring alerting for integration health. Trigger with phrases like "mistral monitoring", "mistral metrics", "mistral observability", "monitor mistral", "mistral alerts".

AI & Automation 2,926 stars 433 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Mistral AI Observability ## Overview Monitor Mistral AI API usage, latency, token consumption, error rates, and costs. Covers instrumented client wrapper, Prometheus metrics, Grafana dashboard panels, alerting rules, and structured logging. ## Prerequisites - Mistral API integration in production - Prometheus or OpenTelemetry-compatible metrics backend - Alerting system (Alertmanager, PagerDuty, or similar) ## Instructions ### Step 1: Instrumented Client Wrapper ```typescript import { Mistral } from '@mistralai/mistralai'; const PRICING: Record<string, { input: number; output: number }> = { 'mistral-small-latest': { input: 0.10, output: 0.30 }, 'mistral-large-latest': { input: 0.50, output: 1.50 }, 'codestral-latest': { input: 0.30, output: 0.90 }, 'mistral-embed': { input: 0.10, output: 0 }, }; interface MetricsEvent { model: string; endpoint: string; durationMs: number; status: 'success' | 'error'; statusCode?: number; inputTokens?: number; outputTokens?: number; costUsd?: number; } function emitMetrics(event: MetricsEvent): void { // Push to your metrics backend (Prometheus, Datadog, etc.) console.log(JSON.stringify({ type: 'mistral_metric', ...event })); } async function instrumentedChat( client: Mistral, model: string, messages: any[], options?: any, ) { const start = performance.now(); try { const response = await client.chat.complete({ model, messages, ...options }); const duration = Math.round(p...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
1 years ago
Last Updated
yesterday
Language
Python
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category