-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Open
Description
Problem
When writing PromQL queries with metric names containing dots (.) using the old syntax, the error message is unclear and doesn't guide users toward the solution.
Current Behavior
Query attempted:
sum by (k8s.pod.name, deployment.environment) (
increase(k8s.container.restarts{k8s.pod.name=~".*nifi.*"}[15m])
)
Error received:
invalid_input
invalid promql query "sum by (k8s.pod.name, deployment.environment) ( increase(k8s.container.restarts{k8s.pod.name=~\".*nifi.*\"}[15m]) )"
Correct Working Query
For reference, the working query with proper syntax:
sum by ("k8s.pod.name", "deployment.environment") (
increase({"k8s.container.restarts", "k8s.pod.name"=~".*nifi.*"}[15m])
)
Environment
SigNoz Version: v0.97.1
Deployment: Self-hosted
Alert Creation: Via Terraform and UI
Impact
- Users migrating from older versions or creating new alerts get stuck
- No indication that this is related to the UTF-8 syntax changes
- Requires community support or deep docs reading to resolve
- Slows down alert creation workflow
Suggested Solution
Add parser-level detection for:
- Metric names with dots/special chars in old syntax
- Label names with dots not quoted
- Provide specific error messages with syntax examples
- Link to migration documentation
Additional Context
This issue is particularly confusing because:
- The UTF-8 syntax change is relatively recent
- Documentation exists but isn't surfaced in the error
- Users copying queries from older tutorials/examples will hit this
- The error looks like a general parsing error, not a syntax version issue