mirror of
https://github.com/gravitational/teleport.git
synced 2026-08-29 05:27:37 +08:00
3b9de7dbde
* Initialize usage reporting via plugin registry after auth server setup Usage reporting was previously initialized in enterprise process constructors (cloud.NewTeleport, pro.NewTeleport), which ran after the OSS auth server completed initialization. This caused enterprise auth extensions to miss the UsageReporter service because they were initialized after the OSS auth server was created but before the usage reporting was set up. To fix the ordering, add a callback mechanism to plugin.Registry: - SetUsageReportingInitFunc registers a callback to be called once the auth server is ready. - InitUsageReporting triggers that callback from initAuthService, after setLocalAuth makes the server available to callers. Signed-off-by: Tiago Silva <tiago.silva@goteleport.com> * update comment * handle review feedback * remove dynamic function load * fix another addition --------- Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>