@@ -218,30 +218,31 @@ with the metric are of interest to you.
218218 })
219219```
220220
221- #### Specify custom bounds for Histogram
221+ #### Specify custom boundaries for Histogram
222222
223- By default, the bounds used for a Histogram are [ `{ 0, 5, 10, 25, 50, 75, 100,
223+ By default, the boundaries used for a Histogram are [ `{ 0, 5, 10, 25, 50, 75, 100,
224224250, 500,
2252251000}`] ( https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/sdk.md#explicit-bucket-histogram-aggregation ) .
226- Views can be used to provide custom bounds for a Histogram. The measurements are
227- then aggregated using the custom bounds provided instead of the the default
228- bounds . This requires the use of ` HistogramConfiguration ` .
226+ Views can be used to provide custom boundaries for a Histogram. The measurements
227+ are then aggregated using the custom boundaries provided instead of the the
228+ default boundaries . This requires the use of ` ExplicitBucketHistogramConfiguration ` .
229229
230230``` csharp
231- // Change Histogram bounds to count measurements under the following buckets:
231+ // Change Histogram boundaries to count measurements under the following buckets:
232232 // (-inf, 10]
233233 // (10, 20]
234234 // (20, +inf)
235235 .AddView (
236236 instrumentName : " MyHistogram" ,
237- new HistogramConfiguration { BucketBounds = new double [] { 10 , 20 } })
237+ new ExplicitBucketHistogramConfiguration
238+ { Boundaries = new double [] { 10 , 20 } })
238239
239- // If you provide an empty `double` array as `BucketBounds ` to the `HistogramConfiguration `,
240+ // If you provide an empty `double` array as `Boundaries ` to the `ExplicitBucketHistogramConfiguration `,
240241 // the SDK will only export the sum and count for the measurements.
241242 // There are no buckets exported in this case.
242243 .AddView (
243244 instrumentName : " MyHistogram" ,
244- new HistogramConfiguration { BucketBounds = new double [] { } })
245+ new ExplicitBucketHistogramConfiguration { Boundaries = new double [] { } })
245246```
246247
247248``` csharp
@@ -251,10 +252,10 @@ bounds. This requires the use of `HistogramConfiguration`.
251252 if (instrument .Meter .Name == " CompanyA.ProductB.LibraryC" &&
252253 instrument .Name == " MyHistogram" )
253254 {
254- // `HistogramConfiguration ` is a child class of `MetricStreamConfiguration`
255- return new HistogramConfiguration
255+ // `ExplicitBucketHistogramConfiguration ` is a child class of `MetricStreamConfiguration`
256+ return new ExplicitBucketHistogramConfiguration
256257 {
257- BucketBounds = new double [] { 10 , 20 },
258+ Boundaries = new double [] { 10 , 20 },
258259 };
259260 }
260261
0 commit comments