From eccfe681175cdd80d99c5027b7967e391ed941bf Mon Sep 17 00:00:00 2001 From: ImoutoChan Date: Sat, 28 Oct 2023 12:46:32 +0400 Subject: [PATCH 1/3] Check isSampled parameter in UpdateWithExemplar method and call ExemplarReservoir!.Offer only when it's true --- src/OpenTelemetry/Metrics/MetricPoint.cs | 44 +++++++++++++++--------- 1 file changed, 28 insertions(+), 16 deletions(-) diff --git a/src/OpenTelemetry/Metrics/MetricPoint.cs b/src/OpenTelemetry/Metrics/MetricPoint.cs index 48f726f4754..831f027b3eb 100644 --- a/src/OpenTelemetry/Metrics/MetricPoint.cs +++ b/src/OpenTelemetry/Metrics/MetricPoint.cs @@ -499,11 +499,14 @@ internal void UpdateWithExemplar(long number, ReadOnlySpan Date: Sat, 28 Oct 2023 20:55:26 +0400 Subject: [PATCH 2/3] Add changelog entry --- src/OpenTelemetry/CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/OpenTelemetry/CHANGELOG.md b/src/OpenTelemetry/CHANGELOG.md index 30856d74dfc..255f967a090 100644 --- a/src/OpenTelemetry/CHANGELOG.md +++ b/src/OpenTelemetry/CHANGELOG.md @@ -11,6 +11,8 @@ `autoGenerateServiceInstanceId` is `true`. ([#4988](https://github.com/open-telemetry/opentelemetry-dotnet/pull/4988)) +* Fixed a bug where isSampled parameter wasn't properly checked in certain cases within the `UpdateWithExemplar` method of `MetricPoint`. ([#4851](https://github.com/open-telemetry/opentelemetry-dotnet/pull/5004)) + ## 1.7.0-alpha.1 Released 2023-Oct-16 From a4bd3dda319afe9d7636cf0cced51c9954bc975a Mon Sep 17 00:00:00 2001 From: ImoutoChan Date: Sat, 28 Oct 2023 20:59:46 +0400 Subject: [PATCH 3/3] Fix line length --- src/OpenTelemetry/CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/OpenTelemetry/CHANGELOG.md b/src/OpenTelemetry/CHANGELOG.md index 255f967a090..e5d3afac461 100644 --- a/src/OpenTelemetry/CHANGELOG.md +++ b/src/OpenTelemetry/CHANGELOG.md @@ -11,7 +11,9 @@ `autoGenerateServiceInstanceId` is `true`. ([#4988](https://github.com/open-telemetry/opentelemetry-dotnet/pull/4988)) -* Fixed a bug where isSampled parameter wasn't properly checked in certain cases within the `UpdateWithExemplar` method of `MetricPoint`. ([#4851](https://github.com/open-telemetry/opentelemetry-dotnet/pull/5004)) +* Fixed a bug where isSampled parameter wasn't properly checked in certain cases + within the `UpdateWithExemplar` method of `MetricPoint`. + ([#4851](https://github.com/open-telemetry/opentelemetry-dotnet/pull/5004)) ## 1.7.0-alpha.1