mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-02-09 15:27:11 +00:00
app/vmselect: typo fix when stripping url path prefixes
This commit is contained in:
parent
83d3e582ab
commit
4d43ab0875
1 changed files with 2 additions and 2 deletions
|
@ -119,7 +119,7 @@ func RequestHandler(w http.ResponseWriter, r *http.Request) bool {
|
||||||
}
|
}
|
||||||
|
|
||||||
if strings.HasPrefix(path, "/api/v1/label/") {
|
if strings.HasPrefix(path, "/api/v1/label/") {
|
||||||
s := r.URL.Path[len("/api/v1/label/"):]
|
s := path[len("/api/v1/label/"):]
|
||||||
if strings.HasSuffix(s, "/values") {
|
if strings.HasSuffix(s, "/values") {
|
||||||
labelValuesRequests.Inc()
|
labelValuesRequests.Inc()
|
||||||
labelName := s[:len(s)-len("/values")]
|
labelName := s[:len(s)-len("/values")]
|
||||||
|
@ -133,7 +133,7 @@ func RequestHandler(w http.ResponseWriter, r *http.Request) bool {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if strings.HasPrefix(path, "/tags/") && !isGraphiteTagsPath(path) {
|
if strings.HasPrefix(path, "/tags/") && !isGraphiteTagsPath(path) {
|
||||||
tagName := r.URL.Path[len("/tags/"):]
|
tagName := path[len("/tags/"):]
|
||||||
graphiteTagValuesRequests.Inc()
|
graphiteTagValuesRequests.Inc()
|
||||||
if err := graphite.TagValuesHandler(startTime, tagName, w, r); err != nil {
|
if err := graphite.TagValuesHandler(startTime, tagName, w, r); err != nil {
|
||||||
graphiteTagValuesErrors.Inc()
|
graphiteTagValuesErrors.Inc()
|
||||||
|
|
Loading…
Reference in a new issue