Skip to content

Conversation

lseguy
Copy link
Contributor

@lseguy lseguy commented Apr 1, 2025

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.

  • Bug fix (non-breaking change which fixes an issue)

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

  • tox -e py311-test-opentelemetry-sdk

Does This PR Require a Contrib Repo Change?

  • Yes. - Link to PR:
  • No.

Checklist:

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated

Copy link

linux-foundation-easycla bot commented Apr 1, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

@lseguy lseguy force-pushed the fix-explicit-aggregation-histogram-advisory branch from a1d97b1 to 6f42342 Compare April 2, 2025 08:26
@xrmx
Copy link
Contributor

xrmx commented Apr 2, 2025

@lseguy any reason this is in draft?

@lseguy
Copy link
Contributor Author

lseguy commented Apr 2, 2025

@lseguy any reason this is in draft?

I just had to sign the CLA and update the CHANGELOG.
I'd be happy to get your review if you don't mind, since you worked on #4361 and #4434.

@lseguy lseguy marked this pull request as ready for review April 2, 2025 13:22
@lseguy lseguy requested a review from a team as a code owner April 2, 2025 13:22
@xrmx xrmx moved this to Ready for review in @xrmx's Python PR digest Apr 2, 2025
Copy link
Member

@emdneto emdneto left a 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?

@lseguy
Copy link
Contributor Author

lseguy commented Apr 2, 2025

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?

Added a new test case checking for default boundaries, let me know if that's not what you had in mind.

@emdneto
Copy link
Member

emdneto commented Apr 2, 2025

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?

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.

@xrmx xrmx enabled auto-merge (squash) April 3, 2025 07:05
@xrmx xrmx merged commit 80593c2 into open-telemetry:main Apr 3, 2025
386 checks passed
@github-project-automation github-project-automation bot moved this from Ready for review to Done in @xrmx's Python PR digest Apr 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants