telemetry: add method to push metrics on demand

This commit is contained in:
Denis Mishin 2024-05-30 16:06:14 -04:00
parent 927f24e1ff
commit 323b9ce900
4 changed files with 73 additions and 20 deletions

View file

@ -143,7 +143,7 @@ func (c *controller) runMetricsReporterLeased(ctx context.Context, client databr
return c.Str("service", "zero-reporter")
})
return c.api.ReportMetrics(ctx,
return c.api.ReportPeriodicMetrics(ctx,
reporter.WithCollectInterval(time.Hour),
reporter.WithMetrics(analytics.Metrics(func() databroker.DataBrokerServiceClient { return client })...),
)