mirror of
https://github.com/prometheus/prometheus.git
synced 2024-11-10 23:54:05 -08:00
Merge "Only log every query when debugging."
This commit is contained in:
commit
af8a1b9d78
|
@ -67,7 +67,7 @@ func (serv MetricsService) Query(w http.ResponseWriter, r *http.Request) {
|
||||||
|
|
||||||
queryStats := stats.NewTimerGroup()
|
queryStats := stats.NewTimerGroup()
|
||||||
result := ast.EvalToString(exprNode, timestamp, format, serv.Storage, queryStats)
|
result := ast.EvalToString(exprNode, timestamp, format, serv.Storage, queryStats)
|
||||||
glog.Infof("Instant query: %s\nQuery stats:\n%s\n", expr, queryStats)
|
glog.V(1).Infof("Instant query: %s\nQuery stats:\n%s\n", expr, queryStats)
|
||||||
fmt.Fprint(w, result)
|
fmt.Fprint(w, result)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -130,7 +130,7 @@ func (serv MetricsService) QueryRange(w http.ResponseWriter, r *http.Request) {
|
||||||
result := ast.TypedValueToJSON(matrix, "matrix")
|
result := ast.TypedValueToJSON(matrix, "matrix")
|
||||||
jsonTimer.Stop()
|
jsonTimer.Stop()
|
||||||
|
|
||||||
glog.Infof("Range query: %s\nQuery stats:\n%s\n", expr, queryStats)
|
glog.V(1).Infof("Range query: %s\nQuery stats:\n%s\n", expr, queryStats)
|
||||||
fmt.Fprint(w, result)
|
fmt.Fprint(w, result)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue