Analytics Overview
Quick Access: Analytics | Request Logs | Cost Insights
LangMart provides comprehensive analytics to help you understand your API usage, costs, and performance. The analytics dashboard gives you visibility into every aspect of your LLM interactions.
Available Analytics
Request Logs
View detailed logs of every API request made through LangMart:
- Request and response details
- Token usage and costs
- Latency metrics
- Resolution journey (for fallback/retry scenarios)
Usage Analytics
Track your usage patterns over time:
- Requests by model and provider
- Token consumption trends
- Cost analysis and projections
- Peak usage patterns
Learn more about Usage Analytics
Error Tracking
Monitor and debug failed requests:
- Error rates and trends
- Error breakdown by type
- Suggested fixes
- Historical error analysis
Learn more about Error Tracking
Dashboard Navigation
Accessing Analytics
- Log in to the LangMart dashboard
- Navigate to the Analytics section in the sidebar
- Choose the specific analytics view you need
Time Range Selection
Most analytics views support customizable time ranges:
- Last 24 Hours: For real-time monitoring
- Last 7 Days: For weekly trends
- Last 30 Days: For monthly analysis
Filtering and Grouping
Analytics can be filtered by:
- Model: Filter by specific model (e.g.,
gpt-4o,claude-3-opus) - Provider: Filter by provider (e.g., OpenAI, Anthropic, Groq)
- Status: Filter by success or error status
- Date Range: Custom date range selection
Data Granularity
Time-series data supports multiple granularity levels:
| Granularity | Best For | Available In |
|---|---|---|
| Hourly | Last 24 hours | Short-term analysis |
| Daily | 7-30 days | Trend identification |
| Weekly | 30+ days | Long-term patterns |
| Monthly | 90+ days | Quarterly reviews |
Key Metrics
Cost Metrics
- Total Cost: Sum of all request costs
- Cost by Model: Breakdown by model
- Cost Projections: Estimated future costs based on trends
Performance Metrics
- Latency: Time from request to response
- Time to First Token (TTFT): Time until streaming begins
- Success Rate: Percentage of successful requests
Token Metrics
- Input Tokens: Tokens sent to the model
- Output Tokens: Tokens received from the model
- Total Tokens: Combined token usage
Setting Up Alerts
Combine analytics with alerts to get proactive notifications:
- Navigate to Alerts in the sidebar
- Create alerts for:
- Cost thresholds
- Error rate spikes
- Usage anomalies
- Quota warnings
See the Alerts documentation for detailed setup instructions.
Exporting Data
Analytics data can be accessed programmatically via the API:
# Get usage analytics
curl -X GET "https://api.langmart.ai/api/account/analytics/usage?start_date=2025-01-01&end_date=2025-01-31" \
-H "Authorization: Bearer YOUR_API_KEY"
# Get request logs
curl -X GET "https://api.langmart.ai/api/account/request-logs?limit=100" \
-H "Authorization: Bearer YOUR_API_KEY"
# Get error analytics
curl -X GET "https://api.langmart.ai/api/account/errors?start_date=2025-01-01" \
-H "Authorization: Bearer YOUR_API_KEY"Quick Access Links
| Feature | Direct Link |
|---|---|
| Analytics Dashboard | https://langmart.ai/analytics |
| Request Logs | https://langmart.ai/requests |
| Usage | https://langmart.ai/usage |
| Cost Insights | https://langmart.ai/analytics/cost-insights |
| Errors | https://langmart.ai/errors |
| Alerts | https://langmart.ai/alerts |
Next Steps
- View Request Logs - Debug individual requests
- Analyze Usage - Understand usage patterns
- Track Errors - Monitor and resolve issues