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

[mdatagen] Telemetry metrics add support for exponential histogram

Open 1pkg opened this issue 4 months ago • 2 comments
trafficstars

Component(s)

cmd/mdatagen

Describe the issue you're reporting

When instrumenting collector components with mdatagen, there is often a need to use histograms to capture metrics such as latency. Currently, mdatagen only supports creating histograms that are collected with the default AggregationExplicitBucketHistogram aggregation. For generic components such as kafkareceiver, kafkaexporter, etc. which may be used with various vendors, it is not very practical to define universal explicit buckets in advance.

It would be very helpful to provide a way to create histograms that are collected with the AggregationBase2ExponentialHistogram aggregation in mdatagen. This would simplify instrumentation for the described use case by providing auto buckets configuration.

Tip

React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.

1pkg avatar Jul 09 '25 23:07 1pkg

Pinging code owners:

  • cmd/mdatagen: @dmitryax

See Adding Labels via Comments if you do not have permissions to add labels yourself.

github-actions[bot] avatar Jul 09 '25 23:07 github-actions[bot]

I'd like to try to implement this change to mdatagen. It seems this can be potentially achieved by wrapping the meter provider internally and leveraging custom View overrides.

1pkg avatar Jul 09 '25 23:07 1pkg