Environments
Environments (tenants) isolate metrics and data across teams, projects, or deployment stages. Each environment has a unique ID that routes data to the correct destination.
Multi-Tenant Architecture
graph LR
A["<div style='font-size: 14px;'>🏢 Team A</div><div style='font-size: 10px; text-align: center;'>env_abc123</div>"] --> D["<div style='font-size: 14px;'>📊 Prometheus</div><div style='font-size: 10px; text-align: center;'>Multi-tenant</div>"]
B["<div style='font-size: 14px;'>🏢 Team B</div><div style='font-size: 10px; text-align: center;'>env_def456</div>"] --> D
C["<div style='font-size: 14px;'>🏢 Team C</div><div style='font-size: 10px; text-align: center;'>env_ghi789</div>"] --> D
D --> E["<div style='font-size: 14px;'>📈 Grafana</div><div style='font-size: 10px; text-align: center;'>Dashboards</div>"]
classDef team fill:#2563eb88,stroke:#1d4ed8,color:#ffffff,stroke-width:2px,rx:8,ry:8
classDef prom fill:#ea580c88,stroke:#c2410c,color:#ffffff,stroke-width:2px,rx:8,ry:8
classDef grafana fill:#059669,stroke:#047857,color:#ffffff,stroke-width:2px,rx:8,ry:8
class A,B,C team
class D prom
class E grafana
| Component | Description |
|---|---|
| Teams | Each team or project gets an isolated environment with its own metrics namespace |
| Prometheus | Multi-tenant storage separates data using environment labels |
| Grafana | Dashboards filtered by environment for secure, isolated views |
Environment ID vs API Key
| Attribute | API Key | Environment ID |
|---|---|---|
| Purpose | Authentication | Data routing |
| Secrecy | Secret credential | Not secret |
| Sharing | Never share publicly | Safe to share in configs |
| Scope | Per-user | Per-team/project |
Use Cases
Separate environments for different teams within an organization:
| Environment ID | Team |
|---|---|
env_platform |
Platform engineering team |
env_backend |
Backend services team |
env_frontend |
Frontend applications team |
Isolate metrics by deployment stage:
| Environment ID | Stage |
|---|---|
env_dev |
Development environment |
env_staging |
Staging/QA environment |
env_prod |
Production environment |
Per-project isolation for large organizations:
| Environment ID | Project |
|---|---|
env_project_alpha |
Project Alpha |
env_project_beta |
Project Beta |
Storage Backends
Environment configurations can be stored in different backends:
| Backend | Use Case | Notes |
|---|---|---|
| Auth0 app_metadata | SaaS mode | Zero additional infrastructure |
| DynamoDB | AWS deployments | Serverless, auto-scaling |
| PostgreSQL | Self-hosted | Full SQL support, transactions |
| K8s ConfigMaps | Air-gapped environments | Cloud-native, no external DB |
See Authentication for backend configuration details.