-
Notifications
You must be signed in to change notification settings - Fork 579
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
Fix ExponentialBucketHistogramAggregation
#3978
base: main
Are you sure you want to change the base?
Conversation
4d83990
to
e8a9bc5
Compare
@euroelessar @rbtz-openai please take a look. This mainly fixes issues with |
@@ -126,17 +126,17 @@ def __init__( | |||
) | |||
self._instrument_is_monotonic = instrument_is_monotonic | |||
|
|||
self._current_value = None |
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.
I renamed _current_value
to _value
and _previous_cumulative_value
to _previous_value
for better consistency.
@@ -403,42 +401,43 @@ def __init__( | |||
): | |||
super().__init__(attributes) | |||
|
|||
self._instrument_aggregation_temporality = ( |
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.
Rearranged these lines to improve consistency with _ExponentialBucketHistogramAggregation
, this way it is much easier to compare them and find the analogous parts between them.
Note to reviewers: I recommend to check out this PR branch and compare it to |
4fdb18f
to
df23d88
Compare
I have moved all variable renaming here. |
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.
Took a look at this but I fail to recognize the actual code change that fixes something 😓
I added a So, this PR fixes the issue with the wrong |
8a5b1a4
to
7332465
Compare
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.
LGTM but please wait for an ack from someone more clueful on histograms 😓
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.
Just some comments related to the tests that I had forgotten to publish
opentelemetry-sdk/tests/metrics/integration_test/test_exponential_bucket_histogram.py
Show resolved
Hide resolved
for metrics_data in results: | ||
self.assertIsNone(metrics_data) | ||
|
||
results = [] |
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.
Everything above here seems like a separate test case like test_synchronous_delta_temporality_no_observations
. Could you separate out?
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.
I also thought about doing that, but for this particular case it is important for us todo all this testing consecutively with the same histogram object. The order matters so I am keeping this all in a single test case.
Nevertheless, what you mention is important so I added comments that "separate the subtests" in this test case.
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.
but for this particular case it is important for us todo all this testing consecutively with the same histogram object.
Can you update the test case name to capture what is being tested?
opentelemetry-sdk/tests/metrics/integration_test/test_exponential_bucket_histogram.py
Show resolved
Hide resolved
bce6df1
to
4530d55
Compare
I am not sure these changes are right, I just wanted to find what would be the value that would make this test case pass.
Fixes #3977
Fixes #3974
Fixes #4037
This PR is analogous to #3429 and #4009