Cardinality Protection
TinyOlly includes built-in protection against metric cardinality explosion with a configurable limit on unique metric names.
Configuration
Environment Variables
| Variable | Default | Description |
|---|---|---|
MAX_METRIC_CARDINALITY |
1000 | Maximum unique metric names |
REDIS_TTL |
1800 | Metric retention (seconds) |
Kubernetes Deployment
Update k8s/tinyolly-otlp-receiver.yaml:
env:
- name: MAX_METRIC_CARDINALITY
value: "2000" # Increase limit
- name: REDIS_TTL
value: "3600" # 1 hour retention
Docker Deployment
Update docker-compose-tinyolly-core.yml in the docker/ directory:
Monitoring
The UI displays cardinality warnings when approaching the limit: - Yellow Warning: 70-90% of limit reached - Red Alert: 90%+ of limit reached
Check current cardinality via the API:
Response: