You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently i use AppMetrics. I'm trying to switch to opentelemetry metrics. Have a couple of questions regarding metric types and how to configure them.
Histogram
Prometheus has Histogram metric type which places reported values in buckets.
AppMetrics calls this BucketHistogram and allows configuring buckets on each metric created:
var metric = new App.Metrics.BucketHistogram.BucketHistogramOptions { Buckets = new double[] { 1, 10, 100 } };
App.Metrics.Metrics.Instance.Measure.BucketHistogram.Update(metric, 42);
So how do i specify buckets for a histogram with opentelemetry-dotnet?
var metric = new Meter("name").CreateHistogram<int>("metric", ???);
I've tried looking in sources and found DefaultHistogramBounds but have no idea how to pass them from user code.
Summary
Prometheus has Summary metric type which calculates quantiles.
OpenTelemetry defines Summary as legacy for some reason.
AppMetrics calls this Histogram (yeah, confusing, i know). While it doesn't allow to configure quantiles/percentiles, user can specify sampling algorithm: uniform, exponentially decaying and sliding window.
var metric = new App.Metrics.Histogram.HistogramOptions() { Reservoir = () => new App.Metrics.ReservoirSampling.ExponentialDecay.DefaultForwardDecayingReservoir(1024, 0.015) };
I've seen mentions of Summary type in prometheus serializer but can't find any metric that uses it. Is it unsupported? Are there any plans on this?
Gauge
Currently existing ObservableGauge requires boilerplate code to maintain a counter and increase/decrease it. Are there any plans to make convenient extensions/wrappers/helpers to simplify its usage? Like a Counter but with .Increase/.Decrease methods maybe?
The text was updated successfully, but these errors were encountered:
Summary : Not supported in SDK/no plans unless spec requires this. (It currently only exist in OTLP protos i think to support metrics from external sources.)
Gauge - Not a wrapper, but there'll be dedicated UpDownCounter and its observable counterpart. #2362 This won't be part of 1st stable release, but would come in the next version.
Question
What are you trying to achieve?
Currently i use AppMetrics. I'm trying to switch to opentelemetry metrics. Have a couple of questions regarding metric types and how to configure them.
Histogram
Prometheus has Histogram metric type which places reported values in buckets.
OpenTelemetry defines Histogram with buckets.
AppMetrics calls this BucketHistogram and allows configuring buckets on each metric created:
So how do i specify buckets for a histogram with opentelemetry-dotnet?
I've tried looking in sources and found DefaultHistogramBounds but have no idea how to pass them from user code.
Summary
Prometheus has Summary metric type which calculates quantiles.
OpenTelemetry defines Summary as legacy for some reason.
AppMetrics calls this Histogram (yeah, confusing, i know). While it doesn't allow to configure quantiles/percentiles, user can specify sampling algorithm: uniform, exponentially decaying and sliding window.
I've seen mentions of
Summary
type in prometheus serializer but can't find any metric that uses it. Is it unsupported? Are there any plans on this?Gauge
Currently existing ObservableGauge requires boilerplate code to maintain a counter and increase/decrease it. Are there any plans to make convenient extensions/wrappers/helpers to simplify its usage? Like a Counter but with .Increase/.Decrease methods maybe?
The text was updated successfully, but these errors were encountered: