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

SDK: span processor interface and simple span processor. (#117)

* SDK: SpanProcessor Interface.

* add simple span processor.

* rename span processor.

* fix logic to export or process span data.
This commit is contained in:
rghetia
2019-09-16 13:58:15 -07:00
committed by GitHub
parent 5df3c071e8
commit cb0d352ec6
6 changed files with 333 additions and 7 deletions

View File

@ -61,6 +61,13 @@ func (tr *tracer) Start(ctx context.Context, name string, o ...apitrace.SpanOpti
span := startSpanInternal(name, parent, remoteParent, opts)
span.tracer = tr
if span.IsRecordingEvents() {
sps, _ := spanProcessors.Load().(spanProcessorMap)
for sp := range sps {
sp.OnStart(span.data)
}
}
ctx, end := startExecutionTracerTask(ctx, name)
span.executionTracerTaskEnd = end
return newContext(ctx, span), span