Skip to content

Commit

Permalink
Adjust gin metrics duration buckets and slow time thresholds
Browse files Browse the repository at this point in the history
  • Loading branch information
absorbb committed Jul 21, 2022
1 parent e10acf1 commit a5a3596
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/routers/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ func SetupRouter(adminToken string, metaStorage meta.Storage, destinations *dest
if metrics.Enabled() {
// get global Monitor object
m := ginmetrics.GetMonitor()
m.SetSlowTime(5)
m.SetSlowTime(0.3)
// set request duration, default {0.1, 0.3, 1.2, 5, 10}
// used to p95, p99
m.SetDuration([]float64{0.1, 0.3, 1.2, 5, 10})
m.SetDuration([]float64{0.01, 0.05, 0.1, 0.3, 1.2, 5, 10})
m.UseWithoutExposingEndpoint(router)
}

Expand Down

0 comments on commit a5a3596

Please sign in to comment.