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 f67a2f1e0f
commit 934a7f485c
No known key found for this signature in database
GPG Key ID: A72BEC6CD3D0DED1

View File

@ -723,7 +723,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