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

[Metrics API] Add support for histogram advice API

Open lalitb opened this issue 2 years ago • 7 comments

Experimental histogram advice API to enable instrumentation library suggest histogram buckets - https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/api.md#instrument-advice

lalitb avatar May 05 '23 17:05 lalitb

Adding the breaking change label: this will require a new or changed API, hence changing the API ABI for metrics.

marcalff avatar May 13 '23 08:05 marcalff

This issue was marked as stale due to lack of activity.

github-actions[bot] avatar Aug 19 '23 01:08 github-actions[bot]

Is the Advice / Hints API still experimental? https://github.com/open-telemetry/opentelemetry-specification/issues/2229

The go client already has support for it now: https://github.com/open-telemetry/opentelemetry-go/pull/4605

dufferzafar avatar Feb 25 '24 03:02 dufferzafar

The java client as well. Not really sure how to use histograms at all without that

Falmarri avatar Apr 03 '24 00:04 Falmarri

@Falmarri - The histogram buckets can be still configured using View API. Or let us know if you are looking for specific configuration from advisory API.

lalitb avatar Apr 03 '24 00:04 lalitb

@lalitb Did I miss docs on this? Is there an example? This is using the sdk classes, right?

Falmarri avatar Apr 03 '24 03:04 Falmarri

Yes, there are unit-tests for custom buckets - https://github.com/open-telemetry/opentelemetry-cpp/blob/fabd8cc2bc318cb47d5db7322ea9c8cd3f4b847a/sdk/test/metrics/histogram_test.cc#L78

lalitb avatar Apr 03 '24 03:04 lalitb