Interview Prep/Monitoring & Observability/Prometheus storage, memory and cardinality

VictoriaMetrics / Prometheus-compatible backend logs `cannot parse sample: too long label value`

IntermediateTroubleshootingPrometheus storage, memory and cardinality
Answer

Likely causes → A label carries a huge string (SQL query, stack trace, JSON blob).

Diagnose → Find the source: curl -s app/metrics | awk 'length > 1000' | head.

Fix → Remove that label in the app; drop it at scrape with labeldrop. Configure label_value_length_limit on the scrape job so Prometheus rejects it early.

Prevent → Set label_limit, label_name_length_limit and label_value_length_limit as global defaults.

All Monitoring & Observability questions Roadmap: Monitoring & alerting

More on Prometheus storage, memory and cardinality