Skip to content

ResourceMonitoring has 2 different meter names #5537

@makazeu

Description

@makazeu

Description

In WindowsContainerSnapshotProvider.cs, the meter name is Microsoft.Extensions.Diagnostics.ResourceMonitoring.

var meter = meterFactory.Create(ResourceUtilizationInstruments.MeterName);

But in WindowsNetworkMetrics.cs, the meter name is ResourceMonitoring.

var meter = meterFactory.Create(nameof(ResourceMonitoring));

This library has 2 different meters, which is confusing to users.

Reproduction Steps

Just use the library.

_ = services.AddResourceMonitoring();

Expected behavior

Both WindowsContainerSnapshotProvider.cs and WindowsNetworkMetrics.cs should use the same meter name, which is Microsoft.Extensions.Diagnostics.ResourceMonitoring.

Actual behavior

WindowsContainerSnapshotProvider.cs uses the meter name Microsoft.Extensions.Diagnostics.ResourceMonitoring while WindowsNetworkMetrics.cs uses a different meter name ResourceMonitoring.

Regression?

No response

Known Workarounds

if we only enable selected meters when collecting metrics, add the ResourceMonitoring one which we are likely miss.
Image

Configuration

No response

Other information

No response

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions