diff --git a/main.go b/main.go index b019d4b..82a233b 100644 --- a/main.go +++ b/main.go @@ -99,6 +99,11 @@ func main() { log.Fatal().Err(err).Msg("Failed to run schema migration") } + log.Debug().Msg("Initializing instance") + if err := initInstance(db, tel); err != nil { + log.Fatal().Err(err).Msg("Failed to initialize instance") + } + // Stateless services requestSigner := svc_impls.NewRequestSignerImpl(tel, zerologr.New(&log.Logger).WithName("request-signer")) @@ -226,8 +231,8 @@ func migrateDB(db *ent.Client, log logr.Logger, telemetry *unitel.Telemetry) err return nil } -func initServerActor(db *ent.Client, telemetry *unitel.Telemetry) error { - s := telemetry.StartSpan(context.Background(), "function", "main.initServerActor") +func initInstance(db *ent.Client, telemetry *unitel.Telemetry) error { + s := telemetry.StartSpan(context.Background(), "function", "main.initInstance") defer s.End() ctx := s.Context()