From 7030665a6326b3480e0463c37a7abaf92e783518 Mon Sep 17 00:00:00 2001 From: Kaushik Iska Date: Sun, 23 Jun 2024 11:43:10 -0400 Subject: [PATCH] cleanup --- flow/cmd/worker.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flow/cmd/worker.go b/flow/cmd/worker.go index 741316a45e..1e03265039 100644 --- a/flow/cmd/worker.go +++ b/flow/cmd/worker.go @@ -118,7 +118,6 @@ func WorkerSetup(opts *WorkerSetupOptions) (*workerSetupResponse, error) { clientOptions.Logger.Error("Failed to setup datadog profiling", "error", err) return nil, err } - defer shutDownDDProfiler() if opts.TemporalCert != "" && opts.TemporalKey != "" { slog.Info("Using temporal certificate/key for authentication") @@ -195,6 +194,7 @@ func WorkerSetup(opts *WorkerSetupOptions) (*workerSetupResponse, error) { Client: c, Worker: w, Cleanup: func() { + shutDownDDProfiler() cleanupOtelManagerFunc() c.Close() },