This commit is contained in:
Caleb Doxsey 2024-08-19 16:32:37 -06:00
parent 2925447d35
commit 0d7ff4f395
9 changed files with 517 additions and 0 deletions

View file

@ -159,6 +159,7 @@ func (c *controller) runZeroControlLoop(ctx context.Context) error {
c.runSessionAnalyticsLeased,
c.runPeriodicHealthChecksLeased,
leaseStatus.MonitorLease,
c.runUsageReporter,
),
)
})
@ -196,6 +197,13 @@ func (c *controller) runPeriodicHealthChecksLeased(ctx context.Context, client d
})
}
func (c *controller) runUsageReporter(ctx context.Context, client databroker.DataBrokerServiceClient) error {
r := newUsageReporter(c.api)
return retry.WithBackoff(ctx, "zero-usage-reporter", func(ctx context.Context) error {
return r.run(ctx, client)
})
}
func (c *controller) getEnvoyScrapeURL() string {
return (&url.URL{
Scheme: "http",