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,266 stars 315 forks Updated today 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
7 months ago
Last Updated
today
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Featured

mistral-cost-tuning

Optimize Mistral AI costs through model selection, token management, and usage monitoring. Use when analyzing Mistral billing, reducing API costs, or implementing usage monitoring and budget alerts. Trigger with phrases like "mistral cost", "mistral billing", "reduce mistral costs", "mistral pricing", "mistral budget".

2,266 Updated today
jeremylongshore
AI & Automation Featured

mistral-prod-checklist

Execute Mistral AI production deployment checklist and rollback procedures. Use when deploying Mistral AI integrations to production, preparing for launch, or implementing go-live procedures. Trigger with phrases like "mistral production", "deploy mistral", "mistral go-live", "mistral launch checklist".

2,266 Updated today
jeremylongshore
AI & Automation Featured

mistral-webhooks-events

Implement Mistral AI async patterns, batch API, agents, and event-driven workflows. Use when building async workflows, using the Agents API, batch inference, or handling long-running Mistral AI operations. Trigger with phrases like "mistral events", "mistral async", "mistral agents", "mistral batch", "mistral queue", "mistral background jobs".

2,266 Updated today
jeremylongshore
AI & Automation Featured

mistral-common-errors

Diagnose and fix Mistral AI common errors and exceptions. Use when encountering Mistral errors, debugging failed requests, or troubleshooting integration issues. Trigger with phrases like "mistral error", "fix mistral", "mistral not working", "debug mistral".

2,266 Updated today
jeremylongshore
AI & Automation Featured

mistral-performance-tuning

Optimize Mistral AI performance with caching, batching, and latency reduction. Use when experiencing slow API responses, implementing caching strategies, or optimizing request throughput for Mistral AI integrations. Trigger with phrases like "mistral performance", "optimize mistral", "mistral latency", "mistral caching", "mistral slow".

2,266 Updated today
jeremylongshore