Avg Release Cycle
612 days ago
💥 Breaking change:
- Removed suppressEmptySamples parameter from all metric creation methods, as the use case can be handled internally without explicit parameter.
- 🐎 Significant performance and memory allocation improvement
- 🆕 New labels API which uses ValueTuple to pass labels
- 🆕 New abstraction IMetricFamily dedicated to manage labeled samples of the metric.
- Method Labels on metric family marked as Obsolete, use WithLabels instead.
- 🐎 Int64-based gauge to achieve the best performance for integer metrics.
- ✅ Metrics static entry point is considered to be obsolete, we encourage you to use MetricFactory directly to create a metrics. As MetricFactory as IoC friendly and could be substituted via interface for unit tests.
💥 Breaking changes:
- 👍 We have decided to drop netstandard1.3 support
- MetricFactory (and Metrics static API) returns IMetricFamily instead of metrics implementation.
- Even though there is extension methods on IMetricFamily to emulate previous API for unlabelled metric sample, there is no way to create extension property for Value. Use IMetricFamily.Unlabelled.Value instead
- ➕ Add netstandard2.1 target.
- 🐎 Performance improvements for metrics scrape.
🚀 This major release dedicated mostly to reduce memory allocation especially while scrape collection to achieve this we made number of improvements and breaking changes.
- 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.
- 🛠 Fix compatibility for v2.* . Use Gauge than Untyped in default metrics.