16 references to ResourceUtilizationInstruments
Microsoft.Extensions.Diagnostics.ResourceMonitoring (16)
Linux\LinuxUtilizationProvider.cs (6)
65var 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)
31ResourceUtilizationInstruments.SystemNetworkConnections,
Windows\Network\WindowsNetworkMetrics.cs (1)
31ResourceUtilizationInstruments.SystemNetworkConnections,
Windows\WindowsContainerSnapshotProvider.cs (5)
108var 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)
84var meter = meterFactory.Create(ResourceUtilizationInstruments.MeterName); 87_ = meter.CreateObservableGauge(name: ResourceUtilizationInstruments.ProcessCpuUtilization, observeValue: CpuPercentage); 88_ = meter.CreateObservableGauge(name: ResourceUtilizationInstruments.ProcessMemoryUtilization, observeValue: MemoryPercentage);