Skip to content

Commit 5214aae

Browse files
committedJul 10, 2023
Add more escapes
Signed-off-by: Felix Yuan <felix.yuan@reddit.com>
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

+1
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)