Przeglądaj źródła

Use NewGoroutine when starting a NewRelic segment

DarthSim 1 miesiąc temu
rodzic
commit
62565c79db
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      metrics/newrelic/newrelic.go

+ 1 - 1
metrics/newrelic/newrelic.go

@@ -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)