You've already forked opentelemetry-go
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:
@ -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
|
||||
|
Reference in New Issue
Block a user