Skip to content

Commit

Permalink
[sdk-metrics] Update Exemplars before MetricPoint CompleteUpdate fires (
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeBlanch committed May 17, 2024
1 parent 8177a39 commit a9c32c9
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions src/OpenTelemetry/Metrics/MetricPoint.cs
Original file line number Diff line number Diff line change
Expand Up @@ -492,9 +492,9 @@ internal void UpdateWithExemplar(long number, ReadOnlySpan<KeyValuePair<string,
}
}

this.CompleteUpdate();

this.UpdateExemplar(number, tags, offerExemplar);

this.CompleteUpdate();
}

internal void Update(double number)
Expand Down Expand Up @@ -608,9 +608,9 @@ internal void UpdateWithExemplar(double number, ReadOnlySpan<KeyValuePair<string
}
}

this.CompleteUpdate();

this.UpdateExemplar(number, tags, offerExemplar);

this.CompleteUpdate();
}

internal void TakeSnapshot(bool outputDelta)
Expand Down Expand Up @@ -899,9 +899,9 @@ private void UpdateHistogram(double number, ReadOnlySpan<KeyValuePair<string, ob

this.mpComponents.ReleaseLock();

this.CompleteUpdate();

this.UpdateExemplar(number, tags, offerExemplar);

this.CompleteUpdate();
}

private void UpdateHistogramWithMinMax(double number, ReadOnlySpan<KeyValuePair<string, object?>> tags = default, bool offerExemplar = false)
Expand All @@ -923,9 +923,9 @@ private void UpdateHistogramWithMinMax(double number, ReadOnlySpan<KeyValuePair<

this.mpComponents.ReleaseLock();

this.CompleteUpdate();

this.UpdateExemplar(number, tags, offerExemplar);

this.CompleteUpdate();
}

private void UpdateHistogramWithBuckets(double number, ReadOnlySpan<KeyValuePair<string, object?>> tags = default, bool offerExemplar = false)
Expand All @@ -947,9 +947,9 @@ private void UpdateHistogramWithBuckets(double number, ReadOnlySpan<KeyValuePair

this.mpComponents.ReleaseLock();

this.CompleteUpdate();

this.UpdateExemplar(number, tags, offerExemplar, bucketIndex);

this.CompleteUpdate();
}

private void UpdateHistogramWithBucketsAndMinMax(double number, ReadOnlySpan<KeyValuePair<string, object?>> tags = default, bool offerExemplar = false)
Expand All @@ -974,9 +974,9 @@ private void UpdateHistogramWithBucketsAndMinMax(double number, ReadOnlySpan<Key

this.mpComponents.ReleaseLock();

this.CompleteUpdate();

this.UpdateExemplar(number, tags, offerExemplar, bucketIndex);

this.CompleteUpdate();
}

private void UpdateBase2ExponentialHistogram(double number, ReadOnlySpan<KeyValuePair<string, object?>> tags = default, bool offerExemplar = false)
Expand All @@ -1002,9 +1002,9 @@ private void UpdateBase2ExponentialHistogram(double number, ReadOnlySpan<KeyValu

this.mpComponents.ReleaseLock();

this.CompleteUpdate();

this.UpdateExemplar(number, tags, offerExemplar);

this.CompleteUpdate();
}

private void UpdateBase2ExponentialHistogramWithMinMax(double number, ReadOnlySpan<KeyValuePair<string, object?>> tags = default, bool offerExemplar = false)
Expand Down Expand Up @@ -1033,9 +1033,9 @@ private void UpdateBase2ExponentialHistogramWithMinMax(double number, ReadOnlySp

this.mpComponents.ReleaseLock();

this.CompleteUpdate();

this.UpdateExemplar(number, tags, offerExemplar);

this.CompleteUpdate();
}

[MethodImpl(MethodImplOptions.AggressiveInlining)]
Expand Down

0 comments on commit a9c32c9

Please sign in to comment.