mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2025-01-05 22:54:18 +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"
|
apievent "github.com/open-telemetry/opentelemetry-go/api/event"
|
||||||
)
|
)
|
||||||
|
|
||||||
type (
|
type event struct {
|
||||||
event struct {
|
message string
|
||||||
message string
|
attributes []core.KeyValue
|
||||||
attributes []core.KeyValue
|
}
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
var _ apievent.Event = (*event)(nil)
|
var _ apievent.Event = (*event)(nil)
|
||||||
|
|
||||||
|
@ -26,6 +26,16 @@ import (
|
|||||||
"github.com/open-telemetry/opentelemetry-go/exporter/observer"
|
"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
|
// SpancContext returns span context of the span. Return SpanContext is usable
|
||||||
// even after the span is finished.
|
// even after the span is finished.
|
||||||
func (sp *span) SpanContext() core.SpanContext {
|
func (sp *span) SpanContext() core.SpanContext {
|
||||||
|
@ -29,21 +29,9 @@ import (
|
|||||||
"github.com/open-telemetry/opentelemetry-go/sdk/event"
|
"github.com/open-telemetry/opentelemetry-go/sdk/event"
|
||||||
)
|
)
|
||||||
|
|
||||||
type (
|
type tracer struct {
|
||||||
span struct {
|
resources core.EventID
|
||||||
tracer *tracer
|
}
|
||||||
spanContext core.SpanContext
|
|
||||||
lock sync.Mutex
|
|
||||||
eventID core.EventID
|
|
||||||
finishOnce sync.Once
|
|
||||||
recordEvent bool
|
|
||||||
status codes.Code
|
|
||||||
}
|
|
||||||
|
|
||||||
tracer struct {
|
|
||||||
resources core.EventID
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
var (
|
var (
|
||||||
ServiceKey = tag.New("service")
|
ServiceKey = tag.New("service")
|
||||||
|
Loading…
Reference in New Issue
Block a user