From eccfe681175cdd80d99c5027b7967e391ed941bf Mon Sep 17 00:00:00 2001 From: ImoutoChan Date: Sat, 28 Oct 2023 12:46:32 +0400 Subject: [PATCH] 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