You've already forked opentelemetry-go
mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2025-06-25 00:16:49 +02:00
Shutdown underlying span exporter while shutting down BatchSpanProcessor (#1443)
* Fix BatchSpanProcessor does not shutdown underlying span exporter * Update CHANGELOG * Fix tests * Update CHANGELOG.md
This commit is contained in:
@ -132,6 +132,11 @@ func (bsp *BatchSpanProcessor) Shutdown(ctx context.Context) error {
|
||||
go func() {
|
||||
close(bsp.stopCh)
|
||||
bsp.stopWait.Wait()
|
||||
if bsp.e != nil {
|
||||
if err := bsp.e.Shutdown(ctx); err != nil {
|
||||
otel.Handle(err)
|
||||
}
|
||||
}
|
||||
close(wait)
|
||||
}()
|
||||
// Wait until the wait group is done or the context is cancelled
|
||||
|
Reference in New Issue
Block a user