diff --git a/x-pack/apm-server/sampling/processor.go b/x-pack/apm-server/sampling/processor.go index 4f5731be56a..2888d1df6e1 100644 --- a/x-pack/apm-server/sampling/processor.go +++ b/x-pack/apm-server/sampling/processor.go @@ -40,7 +40,10 @@ const ( shutdownGracePeriod = 5 * time.Second ) -var gcMutex sync.Mutex // global mutex to protect gc from running concurrently in a hot reload +var ( + // gcMutex is a global mutex to protect gc from running concurrently when 2 TBS processors are active during a hot reload + gcMutex sync.Mutex +) // Processor is a tail-sampling event processor. type Processor struct {