From 5dbb801bac766bc8338d00bc3c43b45c5ec50f95 Mon Sep 17 00:00:00 2001 From: Michi Hoffmann Date: Mon, 5 Dec 2022 11:35:13 +0100 Subject: [PATCH] fix: Do not clone the hub inside StartTransaction (#505) --- 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,