app/vmselect: log locations of sendPrometheusError() calls

Previously the location inside the sendPrometheusError() was logged.
This could make hard investigating error locations via `vm_log_messages_total` metric.
This commit is contained in:
Aliaksandr Valialkin 2023-05-18 20:38:25 -07:00
parent 388ffec262
commit 2b53ff774b
No known key found for this signature in database
GPG Key ID: A72BEC6CD3D0DED1

View File

@ -545,7 +545,7 @@ func isGraphiteTagsPath(path string) bool {
}
func sendPrometheusError(w http.ResponseWriter, r *http.Request, err error) {
logger.Warnf("error in %q: %s", httpserver.GetRequestURI(r), err)
logger.WarnfSkipframes(1, "error in %q: %s", httpserver.GetRequestURI(r), err)
w.Header().Set("Content-Type", "application/json")
statusCode := http.StatusUnprocessableEntity