From 354649e5508190214ecab3a8e0167ebc82c1b7a7 Mon Sep 17 00:00:00 2001 From: Xuan <112967240+xuan-cao-swi@users.noreply.github.com> Date: Fri, 10 Jan 2025 11:04:27 -0500 Subject: [PATCH 1/3] Update metrics_sdk/lib/opentelemetry/sdk/metrics/aggregation/exponential_bucket_histogram.rb Co-authored-by: Kayla Reopelle <87386821+kaylareopelle@users.noreply.github.com> --- .../sdk/metrics/aggregation/exponential_bucket_histogram.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/metrics_sdk/lib/opentelemetry/sdk/metrics/aggregation/exponential_bucket_histogram.rb b/metrics_sdk/lib/opentelemetry/sdk/metrics/aggregation/exponential_bucket_histogram.rb index 73b3e8eae6..f2324251e7 100644 --- a/metrics_sdk/lib/opentelemetry/sdk/metrics/aggregation/exponential_bucket_histogram.rb +++ b/metrics_sdk/lib/opentelemetry/sdk/metrics/aggregation/exponential_bucket_histogram.rb @@ -14,8 +14,7 @@ module OpenTelemetry module SDK module Metrics module Aggregation - # Contains the implementation of the ExponentialBucketHistogram aggregation - # https://opentelemetry.io/docs/specs/otel/metrics/data-model/#exponentialhistogram + # Contains the implementation of the {https://opentelemetry.io/docs/specs/otel/metrics/data-model/#exponentialhistogram ExponentialBucketHistogram} aggregation class ExponentialBucketHistogram # rubocop:disable Metrics/ClassLength attr_reader :aggregation_temporality From a0d0595232e270eeb2e594cb3bbb298e9f74e1a0 Mon Sep 17 00:00:00 2001 From: Xuan <112967240+xuan-cao-swi@users.noreply.github.com> Date: Fri, 10 Jan 2025 11:04:37 -0500 Subject: [PATCH 2/3] Update metrics_sdk/lib/opentelemetry/sdk/metrics/aggregation/exponential_bucket_histogram.rb Co-authored-by: Kayla Reopelle <87386821+kaylareopelle@users.noreply.github.com> --- .../sdk/metrics/aggregation/exponential_bucket_histogram.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metrics_sdk/lib/opentelemetry/sdk/metrics/aggregation/exponential_bucket_histogram.rb b/metrics_sdk/lib/opentelemetry/sdk/metrics/aggregation/exponential_bucket_histogram.rb index f2324251e7..69727f3b26 100644 --- a/metrics_sdk/lib/opentelemetry/sdk/metrics/aggregation/exponential_bucket_histogram.rb +++ b/metrics_sdk/lib/opentelemetry/sdk/metrics/aggregation/exponential_bucket_histogram.rb @@ -23,7 +23,7 @@ class ExponentialBucketHistogram # rubocop:disable Metrics/ClassLength MIN_SCALE = -10 MAX_SIZE = 160 - # The default boundaries is calculated based on default max_size and max_scale value + # The default boundaries are calculated based on default max_size and max_scale values def initialize( aggregation_temporality: ENV.fetch('OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE', :delta), # TODO: aggregation_temporality should be renamed to collect_aggregation_temporality for clear definition max_size: MAX_SIZE, From 65446106517cc48d22aebaba3051855c1d337e14 Mon Sep 17 00:00:00 2001 From: Xuan <112967240+xuan-cao-swi@users.noreply.github.com> Date: Fri, 10 Jan 2025 11:08:02 -0500 Subject: [PATCH 3/3] Update metrics_sdk/test/opentelemetry/sdk/metrics/aggregation/exponential_bucket_histogram_test.rb Co-authored-by: Kayla Reopelle <87386821+kaylareopelle@users.noreply.github.com> --- .../metrics/aggregation/exponential_bucket_histogram_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metrics_sdk/test/opentelemetry/sdk/metrics/aggregation/exponential_bucket_histogram_test.rb b/metrics_sdk/test/opentelemetry/sdk/metrics/aggregation/exponential_bucket_histogram_test.rb index 746ff11884..506b81273d 100644 --- a/metrics_sdk/test/opentelemetry/sdk/metrics/aggregation/exponential_bucket_histogram_test.rb +++ b/metrics_sdk/test/opentelemetry/sdk/metrics/aggregation/exponential_bucket_histogram_test.rb @@ -59,7 +59,7 @@ _(exphdps[1].zero_threshold).must_equal(0) end - it 'rescale_with_alternating_growth_0' do + it 'rescales with alternating growth 0' do # Tests insertion of [2, 4, 1]. The index of 2 (i.e., 0) becomes # `indexBase`, the 4 goes to its right and the 1 goes in the last # position of the backing array. With 3 binary orders of magnitude