Skip to content

Commit

Permalink
fix: Do not clone the hub inside StartTransaction (#505)
Browse files Browse the repository at this point in the history
  • Loading branch information
cleptric committed Dec 5, 2022
1 parent c5a9734 commit 5dbb801
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions tracing.go
Expand Up @@ -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,
Expand Down

0 comments on commit 5dbb801

Please sign in to comment.