You've already forked opentelemetry-go
mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2025-06-27 00:21:15 +02:00
SDK: Multiple Unregister should not trigger multiple shutdown call (#176)
* SDK: Multiple Unregister should not trigger multiple shutdown call * fix a data race: waitGroup.Add() should be outside of a goroutine
This commit is contained in:
@ -104,9 +104,9 @@ func NewBatchSpanProcessor(e export.SpanBatcher, opts ...BatchSpanProcessorOptio
|
||||
|
||||
//Start timer to export metrics
|
||||
ticker := time.NewTicker(bsp.o.ScheduledDelayMillis)
|
||||
bsp.stopWait.Add(1)
|
||||
go func(ctx context.Context) {
|
||||
defer ticker.Stop()
|
||||
bsp.stopWait.Add(1)
|
||||
for {
|
||||
select {
|
||||
case <-bsp.stopCh:
|
||||
|
Reference in New Issue
Block a user