Skip to content

Commit

Permalink
[sdk-metrics] Refactor exemplar offer duplicated code into helper met…
Browse files Browse the repository at this point in the history
…hods inside MetricPoint (#5399)
  • Loading branch information
CodeBlanch authored Feb 29, 2024
1 parent 7ce0c55 commit 77ef123
Show file tree
Hide file tree
Showing 2 changed files with 79 additions and 128 deletions.
4 changes: 2 additions & 2 deletions src/OpenTelemetry/Metrics/AggregatorStore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -996,7 +996,7 @@ private void UpdateLongCustomTags(long value, ReadOnlySpan<KeyValuePair<string,
if (this.IsExemplarEnabled())
{
var shouldSample = this.exemplarFilter.ShouldSample(value, tags);
this.metricPoints[index].UpdateWithExemplar(value, tags: tags, shouldSample);
this.metricPoints[index].UpdateWithExemplar(value, tags, shouldSample);
}
else
{
Expand Down Expand Up @@ -1084,7 +1084,7 @@ private void UpdateDoubleCustomTags(double value, ReadOnlySpan<KeyValuePair<stri
if (this.IsExemplarEnabled())
{
var shouldSample = this.exemplarFilter.ShouldSample(value, tags);
this.metricPoints[index].UpdateWithExemplar(value, tags: tags, shouldSample);
this.metricPoints[index].UpdateWithExemplar(value, tags, shouldSample);
}
else
{
Expand Down
Loading

0 comments on commit 77ef123

Please sign in to comment.