opentelemetry-dotnet icon indicating copy to clipboard operation
opentelemetry-dotnet copied to clipboard

Histogram aggregation should support Min Max

Open cijothomas opened this issue 4 years ago • 6 comments

https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/sdk.md#explicit-bucket-histogram-aggregation It should be collected by default, with the ability to turn off.

cijothomas avatar Nov 03 '21 18:11 cijothomas

I'm interested in helping with this item with some guidance 🙂

mic-max avatar Nov 04 '21 20:11 mic-max

Sure. I wanted to wait till https://github.com/open-telemetry/opentelemetry-proto/pull/279 is merged. But we don't have to wait really for that.

cijothomas avatar Nov 04 '21 20:11 cijothomas

Removing this from 1.3.0 milestone and moving to 1.4.0. 1.3.0 is releasing shortly, and want to allow bake time for the new feature.

cijothomas avatar May 27 '22 01:05 cijothomas

Hi, the previous PR seems to be closed due to inactivity. I am just wondering if I could take that over?

WenheLI avatar Jun 09 '22 17:06 WenheLI

Hi, the previous PR seems to be closed due to inactivity. I am just wondering if I could take that over?

If @mic-max is not planning to work on it, then yes. @mic-max could you respond here?

cijothomas avatar Jun 14 '22 02:06 cijothomas

Hi, the previous PR seems to be closed due to inactivity. I am just wondering if I could take that over?

If @mic-max is not planning to work on it, then yes. @mic-max could you respond here?

Yes, I plan to work on it this week, sorry I missed this notification. It should be a fairly simple fingers crossed rebase and touch up to the existing PR :)

mic-max avatar Jun 29 '22 06:06 mic-max

Are there any docs on how to make this work with the PrometheusExporter? I can't figure out if there is anything special to do here or the exporter. The Metric.CreateHistogram<T> has no settings for buckets or inclusion of min/max.

YarekTyshchenko avatar Apr 19 '23 16:04 YarekTyshchenko

Are there any docs on how to make this work with the PrometheusExporter? I can't figure out if there is anything special to do here or the exporter. The Metric.CreateHistogram<T> has no settings for buckets or inclusion of min/max.

MinMax is not supported for PrometheusExporter. The spec does not mention how to convert Min/Max for Prometheus. https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/compatibility/prometheus_and_openmetrics.md#histograms-1

cijothomas avatar Apr 19 '23 16:04 cijothomas

Thanks for clarification @cijothomas. Do you have any advice on how to proceed? I'm used to using Histogram data type for gauge type metrics like "latency" or "delay" where max data is important. The data itself is a gauge, but missing all the data in between the sampling points is undesirable.

It looks like with OpenTelemetry there's no datatype that would give me this data

Edit: To reference a statsd analog that I've used before: https://github.com/statsd/statsd/blob/master/docs/metric_types.md#timing This is perhaps not well named, as this type is useful for any "gauge-like" metric, where you are interested in all data, and not just the last at time of sampling.

YarekTyshchenko avatar Apr 21 '23 12:04 YarekTyshchenko

I don't fully understand the issue you are facing. If the issue is Prometheus Exporter missing min/max, then this is just a matter of OTel spec clarifying how to map Min/Max to Prometheus model (likely a Prometheus Gauge). Please open an issue in the spec repo for this.

If it is something else, could you elaborate/clarify the exact ask?

cijothomas avatar Apr 21 '23 13:04 cijothomas