mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2025-01-03 22:52:30 +02:00
update type style (#28)
This commit is contained in:
parent
521a6c40f1
commit
f5ec719fbd
@ -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)
|
||||
|
||||
|
@ -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 {
|
||||
|
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user