mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2024-12-26 21:05:00 +02:00
Remove zeroInstrumentKind (#5433)
It is a duplicate of `instrumentKindUndefined`. Use `instrumentKindUndefined` instead.
This commit is contained in:
parent
8dbc7cdb86
commit
fad23ee62c
@ -18,10 +18,7 @@ import (
|
||||
"go.opentelemetry.io/otel/sdk/metric/internal/aggregate"
|
||||
)
|
||||
|
||||
var (
|
||||
zeroInstrumentKind InstrumentKind
|
||||
zeroScope instrumentation.Scope
|
||||
)
|
||||
var zeroScope instrumentation.Scope
|
||||
|
||||
// InstrumentKind is the identifier of a group of instruments that all
|
||||
// performing the same function.
|
||||
@ -81,7 +78,7 @@ type Instrument struct {
|
||||
func (i Instrument) IsEmpty() bool {
|
||||
return i.Name == "" &&
|
||||
i.Description == "" &&
|
||||
i.Kind == zeroInstrumentKind &&
|
||||
i.Kind == instrumentKindUndefined &&
|
||||
i.Unit == "" &&
|
||||
i.Scope == zeroScope
|
||||
}
|
||||
@ -112,7 +109,7 @@ func (i Instrument) matchesDescription(other Instrument) bool {
|
||||
// matchesKind returns true if the Kind of i is its zero-value or it equals the
|
||||
// Kind of other, otherwise false.
|
||||
func (i Instrument) matchesKind(other Instrument) bool {
|
||||
return i.Kind == zeroInstrumentKind || i.Kind == other.Kind
|
||||
return i.Kind == instrumentKindUndefined || i.Kind == other.Kind
|
||||
}
|
||||
|
||||
// matchesUnit returns true if the Unit of i is its zero-value or it equals the
|
||||
|
Loading…
Reference in New Issue
Block a user