From 204b29d65ead76161c2123f5239f6dec42413ced Mon Sep 17 00:00:00 2001 From: David Ashpole Date: Thu, 26 Sep 2024 18:57:56 +0000 Subject: [PATCH] address review comments --- CHANGELOG.md | 6 +----- sdk/metric/exemplar/fixed_size_reservoir.go | 4 ++-- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a37e27773f8..b201a5d6763 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,11 +10,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm ### Added -- Add `go.opentelemetry.io/otel/sdk/metric/exemplar` package which includes - `Exemplar`, `Filter`, `SampledFilter`, `AlwaysOnFilter`, - `HistogramReservoir`, `FixedSizeReservoir`, `Reservoir`, `Value` and - `ValueType` types. These will be used for configuring the exemplar reservoir - for the metrics sdk. (#5747) +- Add `go.opentelemetry.io/otel/sdk/metric/exemplar` package which includes `Exemplar`, `Filter`, `SampledFilter`, `AlwaysOnFilter`, `HistogramReservoir`, `FixedSizeReservoir`, `Reservoir`, `Value` and `ValueType` types. These will be used for configuring the exemplar reservoir for the metrics sdk. (#5747) ### Changed diff --git a/sdk/metric/exemplar/fixed_size_reservoir.go b/sdk/metric/exemplar/fixed_size_reservoir.go index d37436e15a9..34160ca608b 100644 --- a/sdk/metric/exemplar/fixed_size_reservoir.go +++ b/sdk/metric/exemplar/fixed_size_reservoir.go @@ -17,7 +17,7 @@ import ( // sample each one. If there are more than k, the Reservoir will then randomly // sample all additional measurement with a decreasing probability. func NewFixedSizeReservoir(k int) *FixedSizeReservoir { - return newRandRes(newStorage(k)) + return newFixedSizeReservoir(newStorage(k)) } var _ Reservoir = &FixedSizeReservoir{} @@ -45,7 +45,7 @@ type FixedSizeReservoir struct { rng *rand.Rand } -func newRandRes(s *storage) *FixedSizeReservoir { +func newFixedSizeReservoir(s *storage) *FixedSizeReservoir { r := &FixedSizeReservoir{ storage: s, rng: rand.New(rand.NewSource(time.Now().UnixNano())),