feat: define a default duration for metrics update
Signed-off-by: Mario Constanti <mario.constanti@mercedes-benz.com>
This commit is contained in:
parent
97f172eb51
commit
3e025dda2f
5 changed files with 57 additions and 8 deletions
|
|
@ -220,7 +220,7 @@ func main() {
|
|||
router = routers.WithMetricsRouter(router, cfg.Metrics.DisableAuth, metricsMiddleware)
|
||||
|
||||
slog.InfoContext(ctx, "start metrics collection")
|
||||
runnerMetrics.CollectObjectMetric(ctx, runner, time.NewTicker(cfg.Metrics.Period))
|
||||
runnerMetrics.CollectObjectMetric(ctx, runner, time.NewTicker(cfg.Metrics.Duration()))
|
||||
}
|
||||
|
||||
if cfg.Default.DebugServer {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue