# Usage Tracking — Real-Time API Consumption Monitoring Source: https://ofox.io/docs/develop/observability/usage-tracking The OfoxAI Console provides comprehensive usage statistics and performance monitoring. ## Real-Time Usage Statistics ### Overview Dashboard The console homepage displays key metrics: - **Total requests** — Total API calls in the current period - **Total tokens** — Total prompt + completion tokens consumed - **Total cost** — Cumulative cost in the current period - **Success rate** — API request success rate ### Time Trends View trends across different time dimensions: | Dimension | Description | |-----------|-------------| | Real-time | Last 1 hour, per-minute granularity | | Daily | Last 24 hours, per-hour granularity | | Weekly | Last 7 days, per-day granularity | | Monthly | Last 30 days, per-day granularity | ## Multi-Dimensional Analysis ### By Model View usage breakdown per model: - Request count share - Token consumption share - Cost share - Average latency ### By Provider View performance across provider nodes: - Success rate comparison - Latency distribution - Fallback trigger frequency ### By API Key View usage per API Key: - Request volume per key - Cost per key - Useful for tracking costs by project/team ## Alerts ### Alert Rules Configure the following alerts: | Alert Type | Description | |-----------|-------------| | Error rate alert | Error rate exceeds threshold (e.g. 5%) | | Cost alert | Daily/weekly/monthly cost exceeds budget | | Latency alert | Average latency exceeds threshold | | Fallback alert | Abnormal fallback trigger frequency | ### Notification Channels Alerts support the following notification methods: - Email notifications - Webhook (integrates with Slack, Lark, DingTalk, etc.) Alert configuration is managed in the console under **Settings** → **Alert Rules**. ## Best Practices 1. **Use different API Keys for different projects** — Makes it easier to track costs by project 2. **Set cost alerts** — Avoid unexpected high bills 3. **Regularly review model distribution** — Ensure model selection matches expectations 4. **Monitor error rate trends** — Abnormal increases may indicate configuration issues