@@ -83,12 +83,12 @@ public LinuxUtilizationProvider(IOptions<ResourceMonitoringOptions> options, ILi
83
83
84
84
_ = meter . CreateObservableGauge (
85
85
name : ResourceUtilizationInstruments . ContainerCpuLimitUtilization ,
86
- observeValues : ( ) => GetMeasurementsWithRetry ( ( ) => CpuUtilizationLimit ( cpuLimit ) ) ,
86
+ observeValues : ( ) => GetMeasurementWithRetry ( ( ) => CpuUtilizationLimit ( cpuLimit ) ) ,
87
87
unit : "1" ) ;
88
88
89
89
_ = meter . CreateObservableGauge (
90
90
name : ResourceUtilizationInstruments . ContainerCpuRequestUtilization ,
91
- observeValues : ( ) => GetMeasurementsWithRetry ( ( ) => CpuUtilizationRequest ( cpuRequest ) ) ,
91
+ observeValues : ( ) => GetMeasurementWithRetry ( ( ) => CpuUtilizationRequest ( cpuRequest ) ) ,
92
92
unit : "1" ) ;
93
93
94
94
_ = meter . CreateObservableGauge (
@@ -100,28 +100,28 @@ public LinuxUtilizationProvider(IOptions<ResourceMonitoringOptions> options, ILi
100
100
{
101
101
_ = meter . CreateObservableGauge (
102
102
name : ResourceUtilizationInstruments . ContainerCpuLimitUtilization ,
103
- observeValues : ( ) => GetMeasurementsWithRetry ( ( ) => CpuUtilization ( ) * scaleRelativeToCpuLimit ) ,
103
+ observeValues : ( ) => GetMeasurementWithRetry ( ( ) => CpuUtilization ( ) * scaleRelativeToCpuLimit ) ,
104
104
unit : "1" ) ;
105
105
106
106
_ = meter . CreateObservableGauge (
107
107
name : ResourceUtilizationInstruments . ContainerCpuRequestUtilization ,
108
- observeValues : ( ) => GetMeasurementsWithRetry ( ( ) => CpuUtilization ( ) * scaleRelativeToCpuRequest ) ,
108
+ observeValues : ( ) => GetMeasurementWithRetry ( ( ) => CpuUtilization ( ) * scaleRelativeToCpuRequest ) ,
109
109
unit : "1" ) ;
110
110
111
111
_ = meter . CreateObservableGauge (
112
112
name : ResourceUtilizationInstruments . ProcessCpuUtilization ,
113
- observeValues : ( ) => GetMeasurementsWithRetry ( ( ) => CpuUtilization ( ) * scaleRelativeToCpuRequest ) ,
113
+ observeValues : ( ) => GetMeasurementWithRetry ( ( ) => CpuUtilization ( ) * scaleRelativeToCpuRequest ) ,
114
114
unit : "1" ) ;
115
115
}
116
116
117
117
_ = meter . CreateObservableGauge (
118
118
name : ResourceUtilizationInstruments . ContainerMemoryLimitUtilization ,
119
- observeValues : ( ) => GetMeasurementsWithRetry ( MemoryUtilization ) ,
119
+ observeValues : ( ) => GetMeasurementWithRetry ( MemoryUtilization ) ,
120
120
unit : "1" ) ;
121
121
122
122
_ = meter . CreateObservableGauge (
123
123
name : ResourceUtilizationInstruments . ProcessMemoryUtilization ,
124
- observeValues : ( ) => GetMeasurementsWithRetry ( MemoryUtilization ) ,
124
+ observeValues : ( ) => GetMeasurementWithRetry ( MemoryUtilization ) ,
125
125
unit : "1" ) ;
126
126
127
127
// cpuRequest is a CPU request (aka guaranteed number of CPU units) for pod, for host its 1 core
@@ -264,7 +264,7 @@ public Snapshot GetSnapshot()
264
264
memoryUsageInBytes : memoryUsed ) ;
265
265
}
266
266
267
- private Measurement < double > [ ] GetMeasurementsWithRetry ( Func < double > func )
267
+ private Measurement < double > [ ] GetMeasurementWithRetry ( Func < double > func )
268
268
{
269
269
if ( ! TryGetValueWithRetry ( func , out double value ) )
270
270
{
0 commit comments