.NET library to instrument your code with Prometheus metrics
Fix occasional "Collection was modified" exception when serializing metrics. #464
Add support for capturing HttpClient metrics from all registered HttpClients (services.UseHttpClientMetrics()
).
Allow ObservableCounter<T> to be reset. Previously, the MeterAdapter output got stuck on its previous maximum if the underlying Meter reset its value to a lower value. Now we transform the value 1:1.
IManagedLifetimeMetricFactory.WithLabels()
to enable simpler label enrichment in scenarios where lifetime-managed metric instances are used.IMetricFactory.WithLabels()
to define static labels per-factory and reduce the effort needed by users when defining static labels in specific scopes.EventCounterAdapter
and MeterAdapter
are now enabled on startup by default.MetricConfiguration.StaticLabels
because it had negative performance impact on many code paths that did not use it. The same functionality can be manually implemented in user code. Static labels remain available on registry and factory level.Bugfix: HttpClientMetrics under concurrent load with long-running requests were leading to broken response streams. #336
Bugfix: PowersOfTenDividedBuckets did not work with >= 10 divisions due to overlap. Now skips overlapping region of generated series.