Closed gitmln closed 1 month ago
The obvious working workaround for now is to use AddMeeter("ResourceMonitoring")
@evgenyfedorov2 please triage
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?
Description
The following commit https://github.com/dotnet/extensions/commit/cbcef5cee17886e451dc3fd348092205bb438347 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 qualifiedI provide a PR that fixes this bug https://github.com/dotnet/extensions/pull/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