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

Add ExponentialHistogram data point to metrics SDK

Open codeboten opened this issue 3 years ago • 1 comments

The spec says there are 4 data points:

  1. Sum
  2. Gauge
  3. Histogram
  4. Exponential Histogram

Currently the SDK only implements 3 of them: Sum, Gauge, Histogram. See: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/datamodel.md#opentelemetry-protocol-data-model

codeboten avatar Jan 28 '22 23:01 codeboten

You probably already know this Alex, but ExponentialHistogram aggregation is not in the Metrics SDK spec yet (https://github.com/open-telemetry/opentelemetry-specification/pull/2252). I do think it's worth adding it to our export types now to get the OTLP exporter ready in anticipation 🙂

aabmass avatar Feb 01 '22 20:02 aabmass

These are the major changes I'm thinking we'd need to make?:

  1. Implement an ExponentialHistogramAggregation class in aggregation.py.
  2. Add an ExponentialHistogram] data class to point.py
  3. Add support for that class in export/__init__.py.
  4. Modify any modules to make sure they support the new metric type.

I'm sure I'm missing small things here and there, but wanted to see if I'm on the right track before I go any further down a rabbit hole :)

oldclesleycode avatar Feb 14 '23 12:02 oldclesleycode

@clesleycode The majority of work on this is done by @ocelotl. The last remaining part is implemented here https://github.com/open-telemetry/opentelemetry-python/pull/2964.

srikanthccv avatar Feb 14 '23 12:02 srikanthccv

@srikanthccv should we close this then?

oldclesleycode avatar Feb 16 '23 06:02 oldclesleycode

No, there is one more task pending. We should close this when that gets merged.

srikanthccv avatar Feb 16 '23 06:02 srikanthccv

#2964 is merged, closing.

ocelotl avatar Jun 05 '23 08:06 ocelotl