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 
			
		
		
		
	#5304 introduced the following incompatible changes: - `InstrumentKindObservableCounter`: value changed from 4 to 5 - `InstrumentKindObservableGauge`: value changed from 6 to 7 - `InstrumentKindObservableUpDownCounter`: value changed from 5 to 6 This reverts that change, making `InstrumentKindGauge` explicitly `7`. Additionally, this removes the use of `iota` to prevent this kind of breaking change from being accidentally introduced in the future.
		
			
				
	
	
		
			31 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			31 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			Go
		
	
	
	
	
	
| // Code generated by "stringer -type=InstrumentKind -trimprefix=InstrumentKind"; DO NOT EDIT.
 | |
| 
 | |
| package metric
 | |
| 
 | |
| import "strconv"
 | |
| 
 | |
| func _() {
 | |
| 	// An "invalid array index" compiler error signifies that the constant values have changed.
 | |
| 	// Re-run the stringer command to generate them again.
 | |
| 	var x [1]struct{}
 | |
| 	_ = x[instrumentKindUndefined-0]
 | |
| 	_ = x[InstrumentKindCounter-1]
 | |
| 	_ = x[InstrumentKindUpDownCounter-2]
 | |
| 	_ = x[InstrumentKindHistogram-3]
 | |
| 	_ = x[InstrumentKindObservableCounter-4]
 | |
| 	_ = x[InstrumentKindObservableUpDownCounter-5]
 | |
| 	_ = x[InstrumentKindObservableGauge-6]
 | |
| 	_ = x[InstrumentKindGauge-7]
 | |
| }
 | |
| 
 | |
| const _InstrumentKind_name = "instrumentKindUndefinedCounterUpDownCounterHistogramObservableCounterObservableUpDownCounterObservableGaugeGauge"
 | |
| 
 | |
| var _InstrumentKind_index = [...]uint8{0, 23, 30, 43, 52, 69, 92, 107, 112}
 | |
| 
 | |
| func (i InstrumentKind) String() string {
 | |
| 	if i >= InstrumentKind(len(_InstrumentKind_index)-1) {
 | |
| 		return "InstrumentKind(" + strconv.FormatInt(int64(i), 10) + ")"
 | |
| 	}
 | |
| 	return _InstrumentKind_name[_InstrumentKind_index[i]:_InstrumentKind_index[i+1]]
 | |
| }
 |