open-telemetry / open-telemetry/opentelemetry-ruby
Fix exponential-histogram exemplar-reservoir default sizing
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 606
- Forks
- 301
- Avg merge
- 3d 19h
- Merged PRs (30d)
- 42
Description
Spec requirement
The default ExemplarReservoir for exponential histograms MUST be a SimpleFixedSizeExemplarReservoir sized min(20, max_buckets) (sdk.md:1292-1313, Exemplar defaults).
Current behavior
aggregation/exponential_bucket_histogram.rb:33,56 (permalink) uses a plain SimpleFixedSizeExemplarReservoir.new with its own default size (Etc.nprocessors, simple_fixed_size_exemplar_reservoir.rb:16-20 (permalink)) rather than min(20, max_buckets).
Suggested fix
Pass an explicit size: [20, max_buckets].min when constructing the default SimpleFixedSizeExemplarReservoir for exponential-histogram aggregations.
Related rows in SPEC_COMPLIANCE_METRICS.md
SDK-50
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in metrics_sdk/lib/opentelemetry/sdk/metrics/aggregation/exponential_bucket_histogram.rb at the default reservoir construction, then compare its sizing with metrics_sdk/lib/opentelemetry/sdk/metrics/exemplar/simple_fixed_size_exemplar_reservoir.rb. Ensure exponential-histogram defaults use the specified min(20, max_buckets) size, and verify the related SDK-50 compliance behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- observability-sre
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 88/100