Skip to content

Commit

Permalink
update type style (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkerou authored and rghetia committed Jun 27, 2019
1 parent 521a6c4 commit f5ec719
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 21 deletions.
10 changes: 4 additions & 6 deletions sdk/event/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
10 changes: 10 additions & 0 deletions sdk/trace/span.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
18 changes: 3 additions & 15 deletions sdk/trace/trace.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit f5ec719

Please sign in to comment.