Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ResourceMonitoring has 2 different meter names #5537

Closed
makazeu opened this issue Oct 18, 2024 · 1 comment · Fixed by #5541
Closed

ResourceMonitoring has 2 different meter names #5537

makazeu opened this issue Oct 18, 2024 · 1 comment · Fixed by #5541
Assignees
Labels
bug This issue describes a behavior which is not expected - a bug. work in progress 🚧

Comments

@makazeu
Copy link
Contributor

makazeu commented Oct 18, 2024

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

@makazeu makazeu added bug This issue describes a behavior which is not expected - a bug. untriaged labels Oct 18, 2024
@RussKie
Copy link
Member

RussKie commented Oct 18, 2024

@evgenyfedorov2 would it be related to #5404?

@makazeu makazeu changed the title ResourceMonitoring has different meter names ResourceMonitoring has 2 different meter names Oct 18, 2024
@RussKie RussKie removed the untriaged label Oct 20, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Nov 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug This issue describes a behavior which is not expected - a bug. work in progress 🚧
Projects
None yet
3 participants