fix: log stack trace while computing metrics (#2865)
This commit is contained in:
parent
8e9e091656
commit
41b43733b0
1 changed files with 2 additions and 0 deletions
|
@ -102,6 +102,8 @@ var globalPourHistogram = prometheus.NewHistogramVec(
|
|||
|
||||
func computeDynamicMetrics(next http.Handler, dbClient *database.Client) http.HandlerFunc {
|
||||
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
// catch panics here because they are not handled by servePrometheus
|
||||
defer trace.CatchPanic("crowdsec/computeDynamicMetrics")
|
||||
//update cache metrics (stash)
|
||||
cache.UpdateCacheMetrics()
|
||||
//update cache metrics (regexp)
|
||||
|
|
Loading…
Reference in a new issue