opentelemetry-python
opentelemetry-python copied to clipboard
Add ExponentialHistogram data point to metrics SDK
The spec says there are 4 data points:
- Sum
- Gauge
- Histogram
- 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
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 🙂
These are the major changes I'm thinking we'd need to make?:
- Implement an
ExponentialHistogramAggregation
class inaggregation.py
. - Add an
ExponentialHistogram
] data class topoint.py
- Add support for that class in
export/__init__.py
. - 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 :)
@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 should we close this then?
No, there is one more task pending. We should close this when that gets merged.
#2964 is merged, closing.