diff --git a/sdk/event/event.go b/sdk/event/event.go index 84b6a38faaf4..f346f92cedaa 100644 --- a/sdk/event/event.go +++ b/sdk/event/event.go @@ -21,12 +21,10 @@ import ( apievent "github.com/open-telemetry/opentelemetry-go/api/event" ) -type ( - event struct { - message string - attributes []core.KeyValue - } -) +type event struct { + message string + attributes []core.KeyValue +} var _ apievent.Event = (*event)(nil) diff --git a/sdk/trace/span.go b/sdk/trace/span.go index 216ddc86bb6e..804986fda934 100644 --- a/sdk/trace/span.go +++ b/sdk/trace/span.go @@ -26,6 +26,16 @@ import ( "github.com/open-telemetry/opentelemetry-go/exporter/observer" ) +type span struct { + tracer *tracer + spanContext core.SpanContext + lock sync.Mutex + eventID core.EventID + finishOnce sync.Once + recordEvent bool + status codes.Code +} + // SpancContext returns span context of the span. Return SpanContext is usable // even after the span is finished. func (sp *span) SpanContext() core.SpanContext { diff --git a/sdk/trace/trace.go b/sdk/trace/trace.go index 3fb4ced209a9..aefacd7dd9c7 100644 --- a/sdk/trace/trace.go +++ b/sdk/trace/trace.go @@ -29,21 +29,9 @@ import ( "github.com/open-telemetry/opentelemetry-go/sdk/event" ) -type ( - span struct { - tracer *tracer - spanContext core.SpanContext - lock sync.Mutex - eventID core.EventID - finishOnce sync.Once - recordEvent bool - status codes.Code - } - - tracer struct { - resources core.EventID - } -) +type tracer struct { + resources core.EventID +} var ( ServiceKey = tag.New("service")