-
Notifications
You must be signed in to change notification settings - Fork 703
opentelemetry-sdk: fix explicit histogram aggregation to handle multiple explicit bucket advisories #4521
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
opentelemetry-sdk: fix explicit histogram aggregation to handle multiple explicit bucket advisories #4521
Conversation
…xplicit buckets advisory
a1d97b1
to
6f42342
Compare
@lseguy any reason this is in draft? |
opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/aggregation.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right. Thank you for the fix.
That change fixes the bug while keeping the _DEFAULT_EXPLICIT_BUCKET_HISTOGRAM_AGGREGATION_BOUNDARIES in case boundaries are not set. I know we have this test, but can you write one as part of the integration test? Like: asserting if we don't set the explicit buckets advisory it will keep the default ones?
Co-authored-by: Emídio Neto <[email protected]>
…egation.py Co-authored-by: Riccardo Magliocchetti <[email protected]>
Added a new test case checking for default boundaries, let me know if that's not what you had in mind. |
All good. Thank you. |
Description
#4434 merged a fix that allowed the
ExplicitBucketHistogramAggregation
created by the OTLP exporter to take into account histogram buckets advice.However, unlike the
DefaultAggregation
, it does not allow setting independent bucket boundaries for multiple histograms. The first histogram will set the explicit boundaries based on the advice, but the explicit bucket boundaries of further histograms are ignored.This keeps the behavior of the View's explicit settings taking precedence over the advisory, except when
ExplicitBucketHistogramAggregation
uses the default bucket boundaries.Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Does This PR Require a Contrib Repo Change?
Checklist: