Upgrade to OpenTelemetry 1.32.0, add support for bucket boundaries metrics API #3447
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Upgrades to OpenTelemetry 1.32.0. Superseeds #3433.
Looks like our unit tests are doing their job and detected a new OpenTelemetry default method for which we need to add support:
OpenTelemetry
1.32.0
adds the capability to define histogram bucket boundaries via the OpenTelemetry API.Unfortunately this feature only works for exporters which rely on the default aggregation.
For our
custom_metrics_histogram_boundaries
however we needed to provide a custom aggregation from our exporter.I've fixed this by changing the approach:
HistogramBuilder
is created, we initialize it's bucket boundaries tocustom_metrics_histogram_boundaries
via the newsetExplicitBucketBoundariesAdvice
method.Unfortunately this will not work in use-cases where we instrument the SDK instead of the API.
I would however say that this is acceptable and clarified the behaviour in the documentation.
Checklist
Added an API method or config option? Document in which version this will be introduced