Skip to content

dotnet-counter doesn't display UpDownCounter #3742

Closed

Description

@JamesNK

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:

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

Activity

  1. added
    bug
    on Mar 14, 2023
  2. added this to the 8.0.0 milestone on Mar 20, 2023
  3. self-assigned this
    on Mar 30, 2023
  4. ghost locked as resolved and limited conversation to collaborators on Jun 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugdotnet-counters

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions