16 references to ResourceUtilizationInstruments
Microsoft.Extensions.Diagnostics.ResourceMonitoring (16)
Linux\LinuxUtilizationProvider.cs (6)
65
var meter = meterFactory.Create(
ResourceUtilizationInstruments
.MeterName);
68
_ = meter.CreateObservableGauge(name:
ResourceUtilizationInstruments
.ContainerCpuLimitUtilization, observeValue: () => CpuUtilization() * _scaleRelativeToCpuLimit, unit: "1");
69
_ = meter.CreateObservableGauge(name:
ResourceUtilizationInstruments
.ContainerMemoryLimitUtilization, observeValue: MemoryUtilization, unit: "1");
70
_ = meter.CreateObservableGauge(name:
ResourceUtilizationInstruments
.ContainerCpuRequestUtilization, observeValue: () => CpuUtilization() * _scaleRelativeToCpuRequest, unit: "1");
72
_ = meter.CreateObservableGauge(name:
ResourceUtilizationInstruments
.ProcessCpuUtilization, observeValue: () => CpuUtilization() * _scaleRelativeToCpuRequest, unit: "1");
73
_ = meter.CreateObservableGauge(name:
ResourceUtilizationInstruments
.ProcessMemoryUtilization, observeValue: MemoryUtilization, unit: "1");
Linux\Network\LinuxNetworkMetrics.cs (1)
31
ResourceUtilizationInstruments
.SystemNetworkConnections,
Windows\Network\WindowsNetworkMetrics.cs (1)
31
ResourceUtilizationInstruments
.SystemNetworkConnections,
Windows\WindowsContainerSnapshotProvider.cs (5)
108
var meter = meterFactory.Create(
ResourceUtilizationInstruments
.MeterName);
112
_ = meter.CreateObservableGauge(name:
ResourceUtilizationInstruments
.ContainerCpuLimitUtilization, observeValue: CpuPercentage);
113
_ = meter.CreateObservableGauge(name:
ResourceUtilizationInstruments
.ContainerMemoryLimitUtilization, observeValue: () => MemoryPercentage(() => _processInfo.GetMemoryUsage()));
116
_ = meter.CreateObservableGauge(name:
ResourceUtilizationInstruments
.ProcessCpuUtilization, observeValue: CpuPercentage);
117
_ = meter.CreateObservableGauge(name:
ResourceUtilizationInstruments
.ProcessMemoryUtilization, observeValue: () => MemoryPercentage(() => _processInfo.GetCurrentProcessMemoryUsage()));
Windows\WindowsSnapshotProvider.cs (3)
84
var meter = meterFactory.Create(
ResourceUtilizationInstruments
.MeterName);
87
_ = meter.CreateObservableGauge(name:
ResourceUtilizationInstruments
.ProcessCpuUtilization, observeValue: CpuPercentage);
88
_ = meter.CreateObservableGauge(name:
ResourceUtilizationInstruments
.ProcessMemoryUtilization, observeValue: MemoryPercentage);