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
[exporter/awsemfexporter] add exponential histogram support (open-telemetry#22626)
**Description:**
This PR adds [exponential
histogram](https://opentelemetry.io/docs/specs/otel/metrics/data-model/#exponentialhistogram)
support in `awsemfexporter`. The exponential histogram metrics are
exported in Embedded Metric Format (EMF) log. The Count, Sum, Max and
Min are set as Statistical Set. The mid-point values and counts of
exponential histogram buckets are translated into Values/Counts array of
EMF log entry as well.
**Testing:**
The unit test is added and covers positive, zero and negative values.
The integration test is performed with following OTEL collector
configuration.
```
extensions:
health_check:
receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
http:
endpoint: 0.0.0.0:4318
processors:
batch/metrics:
timeout: 60s
exporters:
logging:
verbosity: detailed
awsemf:
region: 'us-east-1'
namespace: "Test"
dimension_rollup_option: "NoDimensionRollup"
service:
pipelines:
metrics:
receivers: [otlp]
processors: [batch/metrics]
exporters: [awsemf, logging]
extensions: [health_check]
telemetry:
logs:
level: "debug"
```
It generated EMF log for histogram metrics in following JSON format.
Notes: It doesn't cover negative values since histograms can [only
record non-negative
values](https://opentelemetry.io/docs/specs/otel/metrics/api/#histogram)
and will [drop negative
values](https://github.com/open-telemetry/opentelemetry-java/blob/main/sdk/metrics/src/main/java/io/opentelemetry/sdk/metrics/SdkDoubleHistogram.java#L38C7-L44).
```
"latency": {
"Values": [
309.4277237034415,
323.12725941969757,
326.64588457862067,
344.8221530867399,
520.3933272846809,
531.7884573308439,
537.579253961712,
543.4331082335607,
549.3507067990806,
555.3327437881196,
561.3799208891041,
567.4929474313465,
720.1774681373079,
0
],
"Counts": [
1,
1,
1,
1,
1,
3,
4,
2,
2,
3,
1,
1,
1,
22
],
"Max": 720,
"Min": 0,
"Count": 44,
"Sum": 11265
}
```
// CalculateDeltaDatapoints retrieves the SummaryDataPoint at the given index and perform calculation with sum and count while retain the quantile value.
0 commit comments