Skip to content

Document histogram bucket behavior when using different units #6438

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions sdk/metric/aggregation.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,15 @@ type AggregationExplicitBucketHistogram struct {
// (-∞, 0], (0, 5.0], (5.0, 10.0], (10.0, 25.0], (25.0, 50.0],
// (50.0, 75.0], (75.0, 100.0], (100.0, 250.0], (250.0, 500.0],
// (500.0, 1000.0], (1000.0, +∞)
//
// The default bucket boundaries are designed to support a variety of
// common measurement units, including time-based and non-time-based metrics.
// They do not automatically adjust based on unit selection.
//
// Note: Using metric.WithUnit("s") for seconds does not automatically
// adjust the bucket boundaries. If a different unit is used, explicitly
// defining bucket boundaries to match the measurement unit is recommended.

Boundaries []float64
// NoMinMax indicates whether to not record the min and max of the
// distribution. By default, these extrema are recorded.
Expand Down