Use NewGoroutine when starting a NewRelic segment

This commit is contained in:
DarthSim
2025-08-18 20:44:38 +03:00
parent 677b5e4872
commit 62565c79db
+1 -1
View File
@@ -176,7 +176,7 @@ func StartSegment(ctx context.Context, name string, meta map[string]any) context
}
if txn, ok := ctx.Value(transactionCtxKey{}).(*newrelic.Transaction); ok {
segment := txn.StartSegment(name)
segment := txn.NewGoroutine().StartSegment(name)
for k, v := range meta {
setMetadata(segment, k, v)