Metrics
AI Cost Firewall exposes Prometheus-format metrics at:
/metrics
curl http://localhost:8080/metrics
Request and cache metrics
aif_requests_total
aif_cache_exact_hits
aif_cache_semantic_hits
aif_cache_misses
aif_upstream_calls_total
Cost metrics
aif_tokens_saved
aif_chat_cost_saved_micro_usd
aif_embedding_cost_micro_usd
aif_cost_saved_micro_usd
aif_cost_saved_micro_usd is net savings after embedding overhead.
Runtime metrics
aif_inflight_requests
aif_readiness_state
aif_shutdown_in_progress
aif_shutdown_rejections_total
Note: aif_inflight_requests includes the /metrics request itself.
Error metrics
aif_errors_total{class="..."}
Semantic diagnostics
aif_semantic_candidates_checked_total
aif_semantic_threshold_results_total{result="pass"}
aif_semantic_threshold_results_total{result="fail"}
aif_semantic_expired_entries_skipped_total
aif_semantic_lookup_duration_seconds
aif_semantic_store_total
aif_semantic_store_errors_total