aws-otel-collector
aws-otel-collector copied to clipboard
Histogram min and max values are always 0
Describe the bug The Histograms we're sending to AWS CW are setting the "min" and "max" values to 0. This is an issue if you want to get percentile, Minimum or Maximum statistics out of those metrics and set alarms on them. The internal AWS team suggested that the issue might be with ADOT or the upstream OpenTelemetry library.
Steps to reproduce
- Use the opentelemetry-js library to implement a histogram with the createHistogram method.
- Use the ADOT to send the metric to CW
- Check the Log Groups in CW to see a sample of the data sent. It won't have "min" and "max" set
- Open CW Metrics, go to the metric created at step 1, switch to "Maximum", "Minimum" or the percentile statistics
What did you expect to see? I expect the data sent by the collector to have a "min" and "max" field set
What did you see instead? The data sent has "min" and "max" always set to 0
Environment
- Fargate version 1.4.0
- NodeJS containers
- Opentelemetry-js
- api 1.0.4
- exporter-metrics and trace 0.27.0
Additional context I've also opened a ticket with AWS Support to check it out and the internal team asked me to open a ticket here to be able to keep track of it and further investigate it. The previous method used was createValueRecorder, in version 0.24.0, which was renamed in 0.27 to createHistogram. It has the same issue as the new one.
The values for min
and max
must be provided by the SDK when a Histogram
is emitted via OTLP. This issue has been raised with the upstream JavaScript SDK team.
The upstream js library has implemented min/max https://github.com/open-telemetry/opentelemetry-js/issues/3010 values and they should be available in the next release of the JS SDK.
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.
This issue was closed because it has been marked as stale for 30 days with no activity.