-
Notifications
You must be signed in to change notification settings - Fork 381
Closed
Description
Description
I'm experimenting with adding metrics to ASP.NET Core (and eventually alongside most or all existing event source counters). See dotnet/aspnetcore#46834
An UpDownCounter<long> created in my app isn't displayed alongside other metrics counters. It appears that publishing data for UpDownCounter and ObserverableUpDownCounter was recently fixed in dotnet/runtime#81041 but there wasn't any logic added to consume the value in CounterMonitor:
diagnostics/src/Tools/dotnet-counters/CounterMonitor.cs
Lines 75 to 110 in e633b84
| if (obj.EventName == "BeginInstrumentReporting") | |
| { | |
| HandleBeginInstrumentReporting(obj); | |
| } | |
| if (obj.EventName == "HistogramValuePublished") | |
| { | |
| HandleHistogram(obj); | |
| } | |
| else if (obj.EventName == "GaugeValuePublished") | |
| { | |
| HandleGauge(obj); | |
| } | |
| else if (obj.EventName == "CounterRateValuePublished") | |
| { | |
| HandleCounterRate(obj); | |
| } | |
| else if (obj.EventName == "TimeSeriesLimitReached") | |
| { | |
| HandleTimeSeriesLimitReached(obj); | |
| } | |
| else if (obj.EventName == "HistogramLimitReached") | |
| { | |
| HandleHistogramLimitReached(obj); | |
| } | |
| else if (obj.EventName == "Error") | |
| { | |
| HandleError(obj); | |
| } | |
| else if (obj.EventName == "ObservableInstrumentCallbackError") | |
| { | |
| HandleObservableInstrumentCallbackError(obj); | |
| } | |
| else if (obj.EventName == "MultipleSessionsNotSupportedError") | |
| { | |
| HandleMultipleSessionsNotSupportedError(obj); | |
| } |
Also test whether dotnet-monitor works with these counter types.
Configuration
.NET 8 web app publishing counters.
dotnet-counters --version
7.0.410101+f99383213ea19741908f5aa3cf0ed400db2e5f0a
Regression?
Unknown
Other information
cc @noahfalk