1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2025-06-27 00:21:15 +02:00

switch atomic.Value to atomic.Pointer for spanProcessorStates (#3926)

Co-authored-by: Chester Cheung <cheung.zhy.csu@gmail.com>
Co-authored-by: Tyler Yahn <MrAlias@users.noreply.github.com>
This commit is contained in:
Damien Mathieu
2023-03-27 18:38:47 +02:00
committed by GitHub
parent 89e383fa1c
commit ae90c4402e
4 changed files with 14 additions and 14 deletions

View File

@ -51,7 +51,7 @@ func (tr *tracer) Start(ctx context.Context, name string, options ...trace.SpanS
s := tr.newSpan(ctx, name, &config)
if rw, ok := s.(ReadWriteSpan); ok && s.IsRecording() {
sps := tr.provider.spanProcessors.Load().(spanProcessorStates)
sps := *(tr.provider.spanProcessors.Load())
for _, sp := range sps {
sp.sp.OnStart(ctx, rw)
}