mufiye commented on code in PR #10449:
URL: https://github.com/apache/skywalking/pull/10449#discussion_r1118021996
##########
oap-server/server-receiver-plugin/otel-receiver-plugin/src/main/java/org/apache/skywalking/oap/server/receiver/otel/otlp/OpenTelemetryMetricRequestProcessor.java:
##########
@@ -161,6 +163,24 @@ private static Map<Double, Long> buildBuckets(
return result;
}
+ private static Map<Double, Long> buildBucketsFromExponentialHistogram(
+ int positiveOffset, final List<Long> positiveBucketCounts,
+ int negativeOffset, final List<Long> negativeBucketCounts, int scale) {
+
+ final Map<Double, Long> result = new HashMap<>();
+ double base = Math.pow(2.0, Math.pow(2.0, -scale));
Review Comment:
> Please check all power calculations whether they are overflowed and reject
the data if so.
Ok, I will add the check.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]