Prometheus.Client v3.0.0 Release Notes
Release Date: 2019-04-27 // almost 5 years ago-
๐ This major release dedicated mostly to reduce memory allocation especially while scrape collection to achieve this we made number of improvements and breaking changes.
๐ Improvements:
- Introduced IMetricsWriter, which used to produce metric samples without creation of CMetricFamily.
- โ Added target to netcore2.2 which allow us to use non-allocating format methods. This dramatically reduces allocation while scrapping for application run on netcore2.2.
- ICollectorRegistry and ICollector interfaces were reviewed.
- Histogram and Summary now expose current state through Value property (which returns snapshot of the state).
- โ Added CounterInt64 - counter optimized for integer values. It uses atomic operations instead of optimistic lock on value increment.
- โ Added IValueObserver abstraction for Histogram and Summary, together with extension methods for convenient duration observation.
- ๐ All value observation methods now support explicit setting timestamp for the observation.
- 0๏ธโฃ Fluent syntax to register default collectors into the CollectorRegistry.
- Reviewed MetricFactory to avoid unnecessary metric creation before checking CollectorRegistry for existing one.
- ๐ Improved unit tests coverage and added benchmarks.
- Library is Strong Named now.
๐ฅ Breaking changes:
- ๐ Legacy .Net Framework 4.5 is not supported anymore.
- โ Removed PerfCounter collectors as a platform dependent feature.
- โ Removed all Contracts because of moving to IMetricsWriter.
- ๐ TextFormatter was removed in favor of MetricsTextWriter.
- ๐ CollectorRegistry.Instance was moved into Metrics.DefaultCollectorRegistry to isolate all static API into Metrics entry point.
- Base classes Collector and Labelled have lots of changes to correspond new API and reduce allocation.
- ๐ IOnDemandCollector was removed in favor of ICollector.
- ๐ ScrapeHandler.Process methods is async now to follow .NET Core 3.0 synchronous operations restrictions.