open-telemetry / opentelemetry-proto

OpenTelemetry protocol (OTLP) specification and Protobuf definitions
https://opentelemetry.io/docs/specs/otlp/
Apache License 2.0
606 stars 263 forks source link

Added json example for exponential histogram #580

Closed swamisriman closed 2 months ago

swamisriman commented 2 months ago

Resolves https://github.com/open-telemetry/opentelemetry-proto/issues/544

The exponential histogram datapoint in this commit, when sent to otel col, produces this log

Metric #0
Descriptor:
     -> Name: my.exponential.histogram
     -> Description: I am an Exponential Histogram
     -> Unit: 1
     -> DataType: ExponentialHistogram
     -> AggregationTemporality: Delta
ExponentialHistogramDataPoints #0
Data point attributes:
     -> my.exponential.histogram.attr: Str(some value)
StartTimestamp: 2018-12-13 14:51:00.3 +0000 UTC
Timestamp: 2018-12-13 14:51:00.3 +0000 UTC
Count: 3
Sum: 10.000000
Min: 0.000000
Max: 5.000000
Bucket [0, 0], Count: 1
Bucket (2.000000, 4.000000], Count: 0
Bucket (4.000000, 8.000000], Count: 2

The actual datapoint values are {0, 5, 5}

linux-foundation-easycla[bot] commented 2 months ago

CLA Signed

The committers listed above are authorized under a signed CLA.

swamisriman commented 2 months ago

Hi @reyang Can you please review?

reyang commented 2 months ago

Hi @reyang Can you please review?

Done, thanks for your contribution @swamisriman!