Skip to content

Commit 8610c24

Browse files
committed
incl exemplars
1 parent 8047d78 commit 8610c24

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

query-proxy/internal/app/query-proxy/reverse.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,16 @@ func modifyRequest(r *http.Request, prometheusServerURL *url.URL, prometheusQuer
6262
}
6363

6464
func checkRequest(r *http.Request, prometheusServerURL *url.URL, config *pkg.Specification) error {
65-
if r.URL.Path == "/api/v1/query" || r.URL.Path == "/api/v1/query_range" {
65+
if r.URL.Path == "/api/v1/query" || r.URL.Path == "/api/v1/query_range" || r.URL.Path == "/api/v1/query_exemplars" {
6666
if err := modifyRequest(r, prometheusServerURL, "query", config); err != nil {
6767
return err
6868
}
69-
}
70-
if r.URL.Path == "/api/v1/series" || strings.HasPrefix(r.URL.Path, "/api/v1/label") {
69+
} else if r.URL.Path == "/api/v1/series" || strings.HasPrefix(r.URL.Path, "/api/v1/label") {
7170
if err := modifyRequest(r, prometheusServerURL, "match[]", config); err != nil {
7271
return err
7372
}
73+
} else {
74+
log.Println("WARN Passthrough", r.URL.Path)
7475
}
7576
r.Host = prometheusServerURL.Host
7677
r.URL.Scheme = prometheusServerURL.Scheme

0 commit comments

Comments
 (0)