Minor optimization on the hot path of the For
method.
IDisposable
returned by IMetricContext.Register
now awaits until scraping iteration end in order to guarantee that IScrapableMetric.Scrape
will not be called afterwards.
Added SendInitialValue
setting for gauges.
Added net6.0
target.
Added MeasureElapsed
timer extension.
- Do not use cache for
DevNullMetricContext
- Clean
GlobalCache
onMetricContext
dispose
Added 'ScrapeOnDispose' option to many primitives.
Added MeasureSync
and MeasureAsync
extensions for lambda-methods (#8).
Added CreateMultiFuncGaugeFromEvents
extension.
- Added
SendZeroValues
setting toGaugeConfig
.
Added support for annotations (AnnotationEvent, IAnnotationContext).
Added an easy-to-use way to print all metric events for debug purposes.
This includes static global senders in MetricContext
and new diagnostic senders: ConsoleMetricEventSender
and TextMetricEventSender
.
- Added
MetricContextProvider
.
- Allow emtpy tags in
MetricDataPoint
. - Make
Quantiles.QuantileTag
method public.
- Added new
CreateFuncGauge
extension with nullable values provider (Func<double?> valueProvider
).
- Increase default scrape period for counters from 1 second to 1 minute.
- Forcibly send counter values on dispose of metric context.
- WellKnownTagKeys: added Component tag.
- Fixed a race condition occurring in initialization of scrapable metric groups (gauges, counters, etc).
- IntegerGauge and FloatingGauge: added
TryIncreaseTo
andTryReduceTo
methods to track max/min values.
- Removed sending empty summary.
- Removed sending empty histogram buckets.
- Added
SendZeroValues
setting toCounterConfig
.
- Made
IMetricContextWrapper
public.
- Fixed
CreateMultiFuncGauge
notIDisposable
anymore.
- Public interface primitives (such as
ICounter
andITimer
andIMetricGroup
) no longer inherit fromIDisposable
. - Following primitive factory methods now use a shared static cache to deduplicate instances of scraped primitives:
CreateCounter
CreateSummary
CreateHistogram
CreateIntegerGauge
CreateFloatingGauge
- Added a new lightweight model —
MetricDataPoint
. It's a simple alternative toMetricEvent
that can be constructed by users. - Added a new primitive —
MultiFuncGauge
. It allows to provide multiple metric values at once usingMetricDataPoints
. - Added a new extension for
IMetricContext
that allows to sendMetricDataPoints
as if they wereMetricEvents
. - All custom user-implemented scrapable primitives now use a separate internal scheduler.
- Removed static
MetricContextProvider
. - Now using
InvariantCulture
comparison forMetricTag
properties.
Fixed resizing of tags containers when appending a lot of tags at once.
Initial prerelease.