Query fails with `parse error: unexpected character inside braces: '-'`
BeginnerTroubleshootingPromQL and recording rules
Answer
Likely causes → A label name contains characters PromQL does not allow unquoted, or quotes are missing around a value.
Diagnose → Check the selector: {app-name=checkout} is invalid.
Fix → Label values must be quoted: {app="checkout"}. Label names must match [a-zA-Z_][a-zA-Z0-9_]*; fix the label at relabel time (labelmap converts unsupported characters to _ for Kubernetes labels).
Prevent → Use Grafana's query builder or autocomplete.
More on PromQL and recording rules
A PromQL query in the UI returns `Empty query result` for a metric you can see on `/metrics`Beginner`rate(http_requests_total[1m])` returns nothing but `http_requests_total` has dataBeginner`rate()` applied to a gauge shows huge spikesBeginnerBinary operation fails: `many-to-many matching not allowed: matching labels must be unique on one side`Advanced`found duplicate series for the match group {pod="api-1"} on the right hand-side of the operation`IntermediateError ratio query returns no data during quiet hoursIntermediate