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

Export package (#162)

* setup sdk exporter package

* use sdk exporter package in sdk trace

* use sdk exporter package in all exporters

* empty the exporters list before testing Load

* move SpanData to the exporter package

* use the SpanProcessor registration, don't register exporters

* rename exporter structs to avoid stutter

* rename Syncer and Batcher to SpanSyncer and SpanBatcher

So it's explicit they are for spans, and we reduce the risk of name
conflict

* remove not moot todo

* rename sdk exporter to export

* only execute the SpanData if it is sampled
This commit is contained in:
Damien Mathieu
2019-10-08 20:56:58 +02:00
committed by rghetia
parent 93c667978d
commit c2d5c66990
14 changed files with 174 additions and 193 deletions

View File

@@ -17,6 +17,8 @@ package trace
import (
"sync"
"sync/atomic"
"go.opentelemetry.io/sdk/export"
)
// SpanProcessor is interface to add hooks to start and end method invocations.
@@ -24,11 +26,11 @@ type SpanProcessor interface {
// OnStart method is invoked when span is started. It is a synchronous call
// and hence should not block.
OnStart(sd *SpanData)
OnStart(sd *export.SpanData)
// OnEnd method is invoked when span is finished. It is a synchronous call
// and hence should not block.
OnEnd(sd *SpanData)
OnEnd(sd *export.SpanData)
// Shutdown is invoked when SDK shutsdown. Use this call to cleanup any processor
// data. No calls to OnStart and OnEnd method is invoked after Shutdown call is