1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2025-06-25 00:16:49 +02:00

Register/unregister in the fixed order (#1198)

- change the processors' map to array
- increase test coverage

Signed-off-by: Hui Kang <kangh@us.ibm.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>

Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
This commit is contained in:
huikang
2020-09-24 14:43:23 -04:00
committed by GitHub
parent 559fecd73e
commit b97533a74b
6 changed files with 82 additions and 41 deletions

View File

@ -43,4 +43,8 @@ type SpanProcessor interface {
ForceFlush()
}
type spanProcessorMap map[SpanProcessor]*sync.Once
type spanProcessorState struct {
sp SpanProcessor
state *sync.Once
}
type spanProcessorStates []*spanProcessorState