Skip to content

Commit

Permalink
Fix ExponentialBucketHistogramAggregation (#3978)
Browse files Browse the repository at this point in the history
* Refactor __init__

* Refactor aggregate

* Handle case for DELTA DELTA

* Checkpoint before removing old code

* Remove old code

* Fix some test cases

* Relocate method

* Debugging test_aggregate_collect

* Fix empty previous bucket handling

* Fix max and min setting

* Fix explicit bucket aggregation to make it consistent

* Rearrange __init__s

* Set scale in aggregate

* Use right values in exponential point

* Set scale right

* Start scale as None

* Make test_collect_results_cumulative pass

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.

* Actually use random values

* Add integration test for exponential histogram

* Handle all cases for current and previous buckets and scale

* Rename test module

* Use random values

* Fix bucket setting

* WIP integration test

* WIP

* Finish integration tests

* Rename variables

* Explain analogy with ExplicitBucket

* Add changelog and fix lint

* Fix equality tests

* Fix location of returns

* Fix another issue and add test case

* Added comments to integration test case

* Fix lint

* Add documentation for test case
  • Loading branch information
ocelotl committed Jul 18, 2024
1 parent b1e99c1 commit e78675e
Show file tree
Hide file tree
Showing 6 changed files with 933 additions and 439 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
([#3956](https://github.com/open-telemetry/opentelemetry-python/pull/3956))
- When encountering an error encoding metric attributes in the OTLP exporter, log the key that had an error.
([#3838](https://github.com/open-telemetry/opentelemetry-python/pull/3838))
- Fix `ExponentialHistogramAggregation`
([#3978](https://github.com/open-telemetry/opentelemetry-python/pull/3978))
- Log a warning when a `LogRecord` in `sdk/log` has dropped attributes
due to reaching limits
([#3946](https://github.com/open-telemetry/opentelemetry-python/pull/3946))
Expand Down
Loading

0 comments on commit e78675e

Please sign in to comment.