Skip to content

Commit 5214aae

Browse files
committed
Add more escapes
Signed-off-by: Felix Yuan <[email protected]>
1 parent 4e53bdf commit 5214aae

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

collector/collector_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ func readMetric(m prometheus.Metric) MetricResult {
4949
func sanitizeQuery(q string) string {
5050
q = strings.Join(strings.Fields(q), " ")
5151
q = strings.Replace(q, "(", "\\(", -1)
52+
q = strings.Replace(q, "?", "\\?", -1)
5253
q = strings.Replace(q, ")", "\\)", -1)
5354
q = strings.Replace(q, "[", "\\[", -1)
5455
q = strings.Replace(q, "]", "\\]", -1)

0 commit comments

Comments
 (0)