nexogen-international / Nexogen.Libraries.Metrics

Library for collecting application metrics in .NET and exporting them to Prometheus
MIT License
61 stars 9 forks source link

Issue with CoreCLR metric #32

Closed eriklg closed 6 years ago

eriklg commented 6 years ago

I am pushing a set of Gauges that I recorded but when scraping the metrics in my push gateway I get the following error:

expected counter in metric process_cpu_seconds_total label:<name:"instance" value:"" > label:<name:"job" value:"test_job" > label:<name:"test_id" value:"978e7cdb-c017-4e69-a9ac-719f96deee91" > gauge:

I am not capturing nor sending this (actively) so it seems like the set up of the metric in the coreclrexporter class is not done properly.

mammerman commented 6 years ago

The issue appears to be in the CoreclrExporter line 121 where it pushes this metric process_cpu_seconds_total as a Gauge when that should be a Counter.