From 808b49435e48b6ee1275782270e5971d699fc830 Mon Sep 17 00:00:00 2001 From: Sebastian Schoder Moreno Date: Tue, 4 Oct 2022 00:28:38 +0200 Subject: [PATCH] Update default buckets for Explicit Bucket Histogram from spec --- docs/metrics/customizing-the-sdk/README.md | 3 +-- src/OpenTelemetry/Metrics/Metric.cs | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/metrics/customizing-the-sdk/README.md b/docs/metrics/customizing-the-sdk/README.md index eeeb64ef819..c8b3c5cf582 100644 --- a/docs/metrics/customizing-the-sdk/README.md +++ b/docs/metrics/customizing-the-sdk/README.md @@ -235,8 +235,7 @@ with the metric are of interest to you. #### Specify custom boundaries for Histogram By default, the boundaries used for a Histogram are [`{ 0, 5, 10, 25, 50, 75, -100, 250, 500, -1000}`](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/sdk.md#explicit-bucket-histogram-aggregation). +100, 250, 500,750, 1000, 2500, 5000, 7500, 10000}`](https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/sdk.md#explicit-bucket-histogram-aggregation). Views can be used to provide custom boundaries for a Histogram. The measurements are then aggregated using the custom boundaries provided instead of the the default boundaries. This requires the use of diff --git a/src/OpenTelemetry/Metrics/Metric.cs b/src/OpenTelemetry/Metrics/Metric.cs index 51e8df9b7ac..c40e0f82ac7 100644 --- a/src/OpenTelemetry/Metrics/Metric.cs +++ b/src/OpenTelemetry/Metrics/Metric.cs @@ -25,7 +25,7 @@ namespace OpenTelemetry.Metrics /// public sealed class Metric { - internal static readonly double[] DefaultHistogramBounds = new double[] { 0, 5, 10, 25, 50, 75, 100, 250, 500, 1000 }; + internal static readonly double[] DefaultHistogramBounds = new double[] { 0, 5, 10, 25, 50, 75, 100, 250, 500, 750, 1000, 2500, 5000, 7500, 10000 }; private readonly AggregatorStore aggStore;