The Problem
Without environment tracking:- Development requests pollute production metrics
- Can’t compare staging vs. production performance
- Difficult to test changes before production rollout
- Cost analytics include test/dev spending
- Alerts trigger on development errors
The Solution
Use Helicone’s custom properties to track environments and segment your data.Implementation
1. Add Environment Headers
Tag every request with its environment:2. Add Version Tracking
Track code version to identify issues:Version tracking helps identify when issues started and compare performance between releases.
3. Environment-Specific Configuration
Different settings per environment:Dashboard Usage
Filter by Environment
1
Navigate to Dashboard
Go to Helicone Dashboard
2
Apply Environment Filter
- Total requests
- Cost
- Error rate
- Latency
3
Compare Environments
Open multiple browser tabs:
- Tab 1: Filter by
Environment = production - Tab 2: Filter by
Environment = staging - Tab 3: Filter by
Environment = development
Environment-Specific Alerts
Create separate alerts per environment:- Production Alert
- Staging Alert
- Development Alert
Configuration:
- Name: Production Error Rate
- Metric: Error Rate
- Threshold: > 2% (strict)
- Time Window: 5 minutes
- Filter:
Environment = production - Notifications: Slack #production-alerts, PagerDuty
Use Cases
1. Pre-Production Testing
Test prompt changes in staging before production:2. Cost Tracking by Environment
See where money is being spent:3. Debugging Production Issues
When production has issues:1
Filter to Production
2
Check Recent Deployments
3
Test Fix in Staging
Deploy fix to staging:
4
Roll Out to Production
After staging validation:
4. A/B Testing Across Environments
Test different approaches:Best Practices
Advanced: Multi-Region Environments
Track both environment and region:Environment Tracking Checklist
- Environment property added to all requests
- Version/commit tracking enabled
- Environment-specific configurations (model, caching, etc.)
- Separate alerts per environment
- Dashboard views filtered by environment
- Cost tracking separated by environment
- Staging environment exists and used for testing
- Team knows which environment they’re working in
Example: Complete Setup
Next Steps
Custom Properties
Learn more about custom properties
Production Monitoring
Set up comprehensive production monitoring
Cost Tracking
Track costs by environment
Alerts
Configure environment-specific alerts