Loading...
Loading...
Fetches aggregated trace metrics (token usage, latency, trace counts, quality evaluations) from MLflow tracking servers. Triggers on requests to show metrics, analyze token usage, view LLM costs, check usage trends, or query trace statistics.
npx skill4agent add mlflow/skills querying-mlflow-metricsscripts/fetch_metrics.pypython scripts/fetch_metrics.py -s http://localhost:5000 -x 1 -m total_tokens -a SUM,AVGAVG: 223.91 SUM: 7613python scripts/fetch_metrics.py -s http://localhost:5000 -x 1 -m total_tokens -a SUM \
-t 3600 --start-time="-24h" --end-time=nowpython scripts/fetch_metrics.py -s http://localhost:5000 -x 1 -m latency -a AVG,P95 -d trace_namepython scripts/fetch_metrics.py -s http://localhost:5000 -x 1 -m trace_count -a COUNT -d trace_statuspython scripts/fetch_metrics.py -s http://localhost:5000 -x 1 -v ASSESSMENTS \
-m assessment_value -a AVG,P50 -d assessment_namepython scripts/fetch_metrics.py -s http://localhost:5000 -x 1 -v ASSESSMENTS \
-m assessment_count -a COUNT -d assessment_name-o json| Arg | Required | Description |
|---|---|---|
| Yes | MLflow server URL |
| Yes | Experiment IDs (comma-separated) |
| Yes | |
| Yes | |
| No | Group by: |
| No | Bucket size in seconds (3600=hourly, 86400=daily) |
| No | |
| No | Same formats as start-time |
| No | |
span_countlatency-v SPANS-v ASSESSMENTS