Add with_boundaries hint API for explicit bucket histograms#2135
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2135 +/- ##
=====================================
Coverage 78.9% 79.0%
=====================================
Files 121 121
Lines 20831 20908 +77
=====================================
+ Hits 16453 16527 +74
- Misses 4378 4381 +3 ☔ View full report in Codecov by Sentry. |
| self | ||
| } | ||
|
|
||
| /// Set the boundaries for this histogram. |
There was a problem hiding this comment.
// Setting boundaries is optional. By default, the boundaries are set to
// [0.0, 5.0, 10.0, 25.0, 50.0, 75.0, 100.0, 250.0, 500.0, 750.0, 1000.0, 2500.0, 5000.0, 7500.0, 10000.0]
please copy this wording too.
cijothomas
left a comment
There was a problem hiding this comment.
LGTM!
This was probably the last blocker, and now we can upgrade opentelemetry metrics api as beta.
|
Co-incidentally, OTel .NET just did the same feature addition at same time as OTel Rust! |
…elemetry#2135) Co-authored-by: Cijo Thomas <cijo.thomas@gmail.com>
Related to #1241
Changes
with_boundarieshint API for explicit bucket histogramsUsage
let histogram = meter .f64_histogram("my_histogram") .with_description("My histogram example description") + .with_boundaries(vec![1.0, 2.0, 3.0, 4.0, 5.0]) .init();Merge requirement checklist
CHANGELOG.mdfiles updated for non-trivial, user-facing changes