-
Notifications
You must be signed in to change notification settings - Fork 1
Observability
Aditya Tawde edited this page Apr 28, 2026
·
2 revisions
Amadeus exposes structured logs, Prometheus metrics, and optional Sentry error tracking.
Endpoint: GET /api/v1/metrics (no auth required)
| Metric | Type | Labels | Description |
|---|---|---|---|
amadeus_llm_calls_total |
Counter | provider |
LLM calls per provider |
amadeus_tool_calls_total |
Counter | tool_name |
Tool invocations |
amadeus_cache_hit_rate |
Gauge | — | Cache hit % (updated on every hit) |
amadeus_llm_cost_usd |
Gauge | — | Estimated cumulative LLM spend |
| HTTP latency histograms | Histogram |
path, method, status
|
P50/P95/P99 per route |
HTTP metrics are provided by prometheus-fastapi-instrumentator.
scrape_configs:
- job_name: amadeus
static_configs:
- targets: ["localhost:8000"]
metrics_path: /api/v1/metricsAll logs are JSON-formatted via structlog. The audit middleware attaches a request_id UUID to every request.
Every response includes:
| Header | Value |
|---|---|
X-Request-ID |
UUID for the request (use for log correlation) |
X-Process-Time |
Wall-clock processing time in seconds |
| Location | Rotation | Backups |
|---|---|---|
data/logs/amadeus.log |
10 MB | 5 files |
Per OWASP guidelines:
- API keys
- Raw user prompts
- Auth tokens / JWTs
- Database credentials
# Liveness probe (load balancer / Railway)
GET /health
# {"status": "ok"}
# Detailed status (DB + Redis + classifier)
GET /api/v1/health/detailed
# {
# "status": "healthy",
# "database": "connected",
# "redis": "connected",
# "classifier_enabled": true,
# "llm_providers": ["groq", "gemini"]
# }Set SENTRY_DSN in .env to enable automatic error capture:
SENTRY_DSN=https://xxx@sentry.io/xxxThe integration captures:
- Unhandled exceptions with FastAPI request context
- Configurable
traces_sample_ratefor performance monitoring
A Grafana dashboard for Prometheus cost gauges is on the roadmap. See Known-Limitations-and-Roadmap.
Amadeus-AI · v6.0.0· Apache License 2.0 · Report a Bug
Getting Started
Architecture
Reference
Integrations
Operations
Development
Project
Links