You've already forked opentelemetry-go
mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2025-11-27 22:49:15 +02:00
Batched span processor (#154)
* add batch span processor. * add blocking support. * use With* function for options. - also changed how Shutdown is handled. * block Shutdown until queue is flushed. * fix comment.
This commit is contained in:
@@ -60,7 +60,7 @@ func RegisterSpanProcessor(e SpanProcessor) {
|
||||
|
||||
// UnregisterSpanProcessor removes from the list of SpanProcessors the SpanProcessor that was
|
||||
// registered with the given name.
|
||||
func UnregisterSpanProcessor(e SpanProcessor) {
|
||||
func UnregisterSpanProcessor(s SpanProcessor) {
|
||||
mu.Lock()
|
||||
defer mu.Unlock()
|
||||
new := make(spanProcessorMap)
|
||||
@@ -69,6 +69,7 @@ func UnregisterSpanProcessor(e SpanProcessor) {
|
||||
new[k] = v
|
||||
}
|
||||
}
|
||||
delete(new, e)
|
||||
delete(new, s)
|
||||
spanProcessors.Store(new)
|
||||
s.Shutdown()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user