Skip to content

Commit fad23ee

Browse files
authored
Remove zeroInstrumentKind (open-telemetry#5433)
It is a duplicate of `instrumentKindUndefined`. Use `instrumentKindUndefined` instead.
1 parent 8dbc7cd commit fad23ee

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

sdk/metric/instrument.go

+3-6
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,7 @@ import (
1818
"go.opentelemetry.io/otel/sdk/metric/internal/aggregate"
1919
)
2020

21-
var (
22-
zeroInstrumentKind InstrumentKind
23-
zeroScope instrumentation.Scope
24-
)
21+
var zeroScope instrumentation.Scope
2522

2623
// InstrumentKind is the identifier of a group of instruments that all
2724
// performing the same function.
@@ -81,7 +78,7 @@ type Instrument struct {
8178
func (i Instrument) IsEmpty() bool {
8279
return i.Name == "" &&
8380
i.Description == "" &&
84-
i.Kind == zeroInstrumentKind &&
81+
i.Kind == instrumentKindUndefined &&
8582
i.Unit == "" &&
8683
i.Scope == zeroScope
8784
}
@@ -112,7 +109,7 @@ func (i Instrument) matchesDescription(other Instrument) bool {
112109
// matchesKind returns true if the Kind of i is its zero-value or it equals the
113110
// Kind of other, otherwise false.
114111
func (i Instrument) matchesKind(other Instrument) bool {
115-
return i.Kind == zeroInstrumentKind || i.Kind == other.Kind
112+
return i.Kind == instrumentKindUndefined || i.Kind == other.Kind
116113
}
117114

118115
// matchesUnit returns true if the Unit of i is its zero-value or it equals the

0 commit comments

Comments
 (0)