-
Notifications
You must be signed in to change notification settings - Fork 647
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
Add exponential Histogram #2930
Conversation
d7b3317
to
57d8834
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.
This may be too large to ask reviewers to review all at once. We are facing similar questions in the OTel-Go group, where I've proposed the corresponding be split into parts:
- The mapping functions
- The basic data structure
- The integration into the SDK
See the latest effort to merge just the mapping functions, which has links to the other draft parts: open-telemetry/opentelemetry-go#3243
opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/exponential/buckets.py
Outdated
Show resolved
Hide resolved
opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/exponential/aggregation.py
Show resolved
Hide resolved
opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/exponential/aggregation.py
Show resolved
Hide resolved
opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/exponential/aggregation.py
Outdated
Show resolved
Hide resolved
|
||
index = self._mapping.map_to_index(value) | ||
|
||
low, high, success = self._increment_index_by(buckets, index, incr) |
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.
Suggest keeping the order of low, high
the same as below, where it's high, low
.
opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/exponential/aggregation.py
Show resolved
Hide resolved
return number | ||
|
||
|
||
def _with(h_low, h_high, o_low, o_high): |
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.
suggest a longer name like combineHighAndLow()
opentelemetry-sdk/src/opentelemetry/sdk/metrics/_internal/exponential/buckets.py
Show resolved
Hide resolved
…nential/aggregation.py Co-authored-by: Joshua MacDonald <[email protected]>
…nential/buckets.py Co-authored-by: Joshua MacDonald <[email protected]>
Closing this PR to split it in smaller PRs. |
Fixes #2421