You've already forked opentelemetry-go
							
							
				mirror of
				https://github.com/open-telemetry/opentelemetry-go.git
				synced 2025-10-31 00:07:40 +02:00 
			
		
		
		
	Remove zeroInstrumentKind (#5433)
It is a duplicate of `instrumentKindUndefined`. Use `instrumentKindUndefined` instead.
This commit is contained in:
		| @@ -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 | ||||
|   | ||||
		Reference in New Issue
	
	Block a user