mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2025-04-02 22:05:40 +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"
|
"go.opentelemetry.io/otel/sdk/metric/internal/aggregate"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var zeroScope instrumentation.Scope
|
||||||
zeroInstrumentKind InstrumentKind
|
|
||||||
zeroScope instrumentation.Scope
|
|
||||||
)
|
|
||||||
|
|
||||||
// InstrumentKind is the identifier of a group of instruments that all
|
// InstrumentKind is the identifier of a group of instruments that all
|
||||||
// performing the same function.
|
// performing the same function.
|
||||||
@ -81,7 +78,7 @@ type Instrument struct {
|
|||||||
func (i Instrument) IsEmpty() bool {
|
func (i Instrument) IsEmpty() bool {
|
||||||
return i.Name == "" &&
|
return i.Name == "" &&
|
||||||
i.Description == "" &&
|
i.Description == "" &&
|
||||||
i.Kind == zeroInstrumentKind &&
|
i.Kind == instrumentKindUndefined &&
|
||||||
i.Unit == "" &&
|
i.Unit == "" &&
|
||||||
i.Scope == zeroScope
|
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
|
// matchesKind returns true if the Kind of i is its zero-value or it equals the
|
||||||
// Kind of other, otherwise false.
|
// Kind of other, otherwise false.
|
||||||
func (i Instrument) matchesKind(other Instrument) bool {
|
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
|
// matchesUnit returns true if the Unit of i is its zero-value or it equals the
|
||||||
|
Loading…
x
Reference in New Issue
Block a user