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

Microsoft.Extensions.Diagnostics.ResourceMonitoring meter name changed to ResourceMonitoring #5404

Closed
gitmln opened this issue Sep 5, 2024 · 3 comments · Fixed by #5403
Closed
Assignees
Labels
area-telemetry bug This issue describes a behavior which is not expected - a bug. work in progress 🚧

Comments

@gitmln
Copy link
Contributor

gitmln commented Sep 5, 2024

Description

The following commit cbcef5c changed the name of Microsoft.Extensions.Diagnostics.ResourceMonitoring main meter.
The correct one is Microsoft.Extensions.Diagnostics.ResourceMonitoring. The current value (for v8.8) is "ResourceMonitoring".

The problem is with nameof expression meterFactory.Create(nameof(Microsoft.Extensions.Diagnostics.ResourceMonitoring));
Please check https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/operators/nameof When the operand is a type or a namespace, the produced name isn't fully qualified

I provide a PR that fixes this bug #5403

Reproduction Steps

AddMeeter("Microsoft.Extensions.Diagnostics.ResourceMonitoring")
Run any sample program. ResourceMonitoring Metrics are no longer produced.

Expected behavior

AddMeeter("Microsoft.Extensions.Diagnostics.ResourceMonitoring") gives ResourceMonitoring metrics.

Actual behavior

AddMeeter("Microsoft.Extensions.Diagnostics.ResourceMonitoring") gives no ResourceMonitoring metrics.

Regression?

Worked in < v8.8

Known Workarounds

No response

Configuration

No response

Other information

No response

@gitmln gitmln added bug This issue describes a behavior which is not expected - a bug. untriaged labels Sep 5, 2024
@gitmln gitmln changed the title Microsoft.Extensions.Diagnostics.ResourceMonitoring meter named changed to ResourceMonitoring Microsoft.Extensions.Diagnostics.ResourceMonitoring meter name changed to ResourceMonitoring Sep 5, 2024
@gitmln
Copy link
Contributor Author

gitmln commented Sep 5, 2024

The obvious working workaround for now is to use AddMeeter("ResourceMonitoring")

@RussKie
Copy link
Member

RussKie commented Sep 5, 2024

@evgenyfedorov2 please triage

@joperezr
Copy link
Member

joperezr commented Sep 5, 2024

We should fix this as it is a regression that breaks dashboards/alerts. Might be patch-worthy. Going on a tangent for a bit, but can we make sure we add tests that catch these type of regressions so this won't break in the future?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-telemetry bug This issue describes a behavior which is not expected - a bug. work in progress 🚧
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants