diff --git a/sdk/include/opentelemetry/sdk/metrics/data/circular_buffer.h b/sdk/include/opentelemetry/sdk/metrics/data/circular_buffer.h index d66f9b38b8..1608a3a011 100644 --- a/sdk/include/opentelemetry/sdk/metrics/data/circular_buffer.h +++ b/sdk/include/opentelemetry/sdk/metrics/data/circular_buffer.h @@ -143,9 +143,13 @@ class AdaptingCircularBufferCounter static constexpr int32_t kNullIndex = std::numeric_limits::min(); + // Index of the first populated element, may be kNullIndex if container is empty. int32_t start_index_ = kNullIndex; - int32_t end_index_ = kNullIndex; - int32_t base_index_ = kNullIndex; + // Index of the last populated element, may be kNullIndex if container is empty. + int32_t end_index_ = kNullIndex; + // Index corresponding to the element located at the start of the backing array, may be kNullIndex + // if container is empty. + int32_t base_index_ = kNullIndex; AdaptingIntegerArray backing_; };