mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2024-12-02 08:52:21 +02:00
check interface implement (#37)
This commit is contained in:
parent
a606839692
commit
861e3e8776
@ -39,6 +39,8 @@ type scopeIdent struct {
|
||||
id core.ScopeID
|
||||
}
|
||||
|
||||
var _ Scope = (*scopeIdent)(nil)
|
||||
|
||||
type scopeKeyType struct{}
|
||||
|
||||
var (
|
||||
|
@ -31,6 +31,8 @@ type Recorder struct {
|
||||
core.ScopeID
|
||||
}
|
||||
|
||||
var _ Interface = (*Recorder)(nil)
|
||||
|
||||
func With(scope scope.Scope) Recorder {
|
||||
return Recorder{scope.ScopeID()}
|
||||
}
|
||||
|
@ -21,12 +21,16 @@ import (
|
||||
|
||||
"github.com/open-telemetry/opentelemetry-go/api/core"
|
||||
"github.com/open-telemetry/opentelemetry-go/api/event"
|
||||
"github.com/open-telemetry/opentelemetry-go/api/scope"
|
||||
"github.com/open-telemetry/opentelemetry-go/api/stats"
|
||||
)
|
||||
|
||||
type noopSpan struct {
|
||||
}
|
||||
|
||||
var _ Span = (*noopSpan)(nil)
|
||||
var _ stats.Interface = (*noopSpan)(nil)
|
||||
var _ scope.Mutable = (*noopSpan)(nil)
|
||||
|
||||
// SpancContext returns an invalid span context.
|
||||
func (sp *noopSpan) SpanContext() core.SpanContext {
|
||||
|
Loading…
Reference in New Issue
Block a user