Skip to content
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

Adapt otel exponential histogram data #10449

Merged
merged 14 commits into from
Feb 28, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ private static Map<Double, Long> buildBucketsFromExponentialHistogram(
final Map<Double, Long> result = new HashMap<>();
mufiye marked this conversation as resolved.
Show resolved Hide resolved
double base = Math.pow(2.0, Math.pow(2.0, -scale));
mufiye marked this conversation as resolved.
Show resolved Hide resolved
if (base == Double.POSITIVE_INFINITY) {
if (log.isDebugEnabled()) {
if (log.isWarnEnabled()) {
log.warn("Receive and reject out-of-range ExponentialHistogram data");
}
mufiye marked this conversation as resolved.
Show resolved Hide resolved
return result;
Expand All @@ -196,7 +196,7 @@ private static Map<Double, Long> buildBucketsFromExponentialHistogram(
for (int i = 0; i < negativeBucketCounts.size(); i++) {
upperBound = -Math.pow(base, negativeOffset + i);
if (upperBound == Double.NEGATIVE_INFINITY) {
if (log.isDebugEnabled()) {
if (log.isWarnEnabled()) {
log.warn("Receive and reject out-of-range ExponentialHistogram data");
}
break;
mufiye marked this conversation as resolved.
Show resolved Hide resolved
Expand All @@ -206,7 +206,7 @@ private static Map<Double, Long> buildBucketsFromExponentialHistogram(
for (int i = 0; i < positiveBucketCounts.size() - 1; i++) {
upperBound = Math.pow(base, positiveOffset + i + 1);
if (upperBound == Double.POSITIVE_INFINITY) {
if (log.isDebugEnabled()) {
if (log.isWarnEnabled()) {
log.warn("Receive and reject out-of-range ExponentialHistogram data");
}
break;
mufiye marked this conversation as resolved.
Show resolved Hide resolved
Expand Down