Skip to content

Commit

Permalink
rename oppattern to labelvaluespattern
Browse files Browse the repository at this point in the history
Signed-off-by: Jin Dong <djdongjin95@gmail.com>
  • Loading branch information
djdongjin committed May 24, 2022
1 parent 4451bd7 commit ae0b757
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/queryfrontend/roundtrip.go
Expand Up @@ -27,7 +27,7 @@ const (
seriesOp = "series"
)

var opPattern = regexp.MustCompile("/api/v1/label/.+/values$")
var labelValuesPattern = regexp.MustCompile("/api/v1/label/.+/values$")

// NewTripperware returns a Tripperware which sends requests to different sub tripperwares based on the query type.
func NewTripperware(config Config, reg prometheus.Registerer, logger log.Logger) (queryrange.Tripperware, error) {
Expand Down Expand Up @@ -122,7 +122,7 @@ func getOperation(r *http.Request) string {
case strings.HasSuffix(r.URL.Path, "/api/v1/series"):
return seriesOp
default:
if opPattern.MatchString(r.URL.Path) {
if labelValuesPattern.MatchString(r.URL.Path) {
return labelValuesOp
}
}
Expand Down

0 comments on commit ae0b757

Please sign in to comment.