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.