From dc0b0e3ea1dc37a815898ea2174b343c2ab06f12 Mon Sep 17 00:00:00 2001 From: Michael Hoffmann Date: Wed, 30 Nov 2022 22:21:59 +0100 Subject: [PATCH] fix: Do not clone the hub inside StartTransaction --- tracing.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tracing.go b/tracing.go index 771addef..94562ccb 100644 --- a/tracing.go +++ b/tracing.go @@ -682,11 +682,7 @@ func StartTransaction(ctx context.Context, name string, options ...SpanOption) * if exists { return currentTransaction } - hub := GetHubFromContext(ctx) - if hub == nil { - hub = CurrentHub().Clone() - ctx = SetHubOnContext(ctx, hub) - } + options = append(options, TransactionName(name)) return StartSpan( ctx,