Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Histogram aggregator functional options #1434

Merged
merged 12 commits into from Jan 15, 2021

Conversation

jmacd
Copy link
Contributor

@jmacd jmacd commented Jan 3, 2021

Introduces a functional option WithExplicitBoundaries() where there was formerly an explicit []float64 argument.

This is to prepare for open-telemetry/opentelemetry-specification#982, adding multiple histogram boundary schemes.

This uses the Prometheus default histogram buckets (11) as the default for floating point histograms (0.005 ... 10). Integer histograms use the same bucket defaults multiplied by 1e6 (5_000 ... 10_000_000).

@codecov
Copy link

codecov bot commented Jan 3, 2021

Codecov Report

Merging #1434 (bda3559) into master (0df8cd6) will increase coverage by 0.0%.
The diff coverage is 100.0%.

Impacted file tree graph

@@          Coverage Diff           @@
##           master   #1434   +/-   ##
======================================
  Coverage    78.9%   79.0%           
======================================
  Files         128     128           
  Lines        6672    6685   +13     
======================================
+ Hits         5269    5282   +13     
  Misses       1148    1148           
  Partials      255     255           
Impacted Files Coverage Δ
exporters/metric/prometheus/prometheus.go 64.8% <100.0%> (+0.5%) ⬆️
sdk/metric/aggregator/histogram/histogram.go 96.8% <100.0%> (+0.6%) ⬆️
sdk/metric/processor/processortest/test.go 89.7% <100.0%> (ø)
sdk/metric/selector/simple/simple.go 100.0% <100.0%> (ø)

Copy link
Contributor

@evantorrie evantorrie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jmacd
Copy link
Contributor Author

jmacd commented Jan 5, 2021

@bogdandrutu Please review.

sdk/metric/aggregator/histogram/histogram.go Outdated Show resolved Hide resolved
sdk/metric/aggregator/histogram/histogram.go Outdated Show resolved Hide resolved
sdk/metric/aggregator/histogram/histogram.go Outdated Show resolved Hide resolved
@Aneurysm9 Aneurysm9 merged commit c562277 into open-telemetry:master Jan 15, 2021
@jmacd jmacd deleted the jmacd/histoption branch February 4, 2021 18:36
@MrAlias MrAlias mentioned this pull request Feb 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants