From c8be45008fceb97fa64797b1a48c07ea39415b52 Mon Sep 17 00:00:00 2001 From: Bryan Frimin Date: Fri, 20 Feb 2026 12:49:55 +0100 Subject: [PATCH] Fix otel span lost Signed-off-by: Bryan Frimin --- pkg/esign/service.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkg/esign/service.go b/pkg/esign/service.go index d29054359..43c489f3e 100644 --- a/pkg/esign/service.go +++ b/pkg/esign/service.go @@ -97,7 +97,9 @@ func NewService( func (s *Service) Run(ctx context.Context, presenterConfigFunc EmailPresenterConfigFunc) error { g := errgroup.Group{} - sealingWorkerCtx, stopSealingWorker := context.WithCancel(context.Background()) + nonCancelableCtx := context.WithoutCancel(ctx) + + sealingWorkerCtx, stopSealingWorker := context.WithCancel(nonCancelableCtx) sealingWorker := NewSealingWorker( s.pg, s.fileManager, @@ -106,7 +108,7 @@ func (s *Service) Run(ctx context.Context, presenterConfigFunc EmailPresenterCon ) g.Go(func() error { return sealingWorker.Run(sealingWorkerCtx) }) - certWorkerCtx, stopCertWorker := context.WithCancel(context.Background()) + certWorkerCtx, stopCertWorker := context.WithCancel(nonCancelableCtx) certWorker := NewCompletionCertificateWorker( s.pg, s.fileManager,