Skip to content

Commit

Permalink
[sdk-metrics] Remove locking around exemplar updates in MetricPoint (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeBlanch authored Apr 17, 2024
1 parent 3898df5 commit bf423cc
Show file tree
Hide file tree
Showing 2 changed files with 111 additions and 429 deletions.
8 changes: 4 additions & 4 deletions src/OpenTelemetry/Metrics/AggregatorStore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -989,14 +989,14 @@ private void UpdateLongMetricPoint(int metricPointIndex, long value, ReadOnlySpa
this.metricPoints[metricPointIndex].UpdateWithExemplar(
value,
tags,
isSampled: true);
offerExemplar: true);
}
else
{
this.metricPoints[metricPointIndex].UpdateWithExemplar(
value,
tags,
isSampled: Activity.Current?.Recorded ?? false);
offerExemplar: Activity.Current?.Recorded ?? false);
}
}

Expand Down Expand Up @@ -1044,14 +1044,14 @@ private void UpdateDoubleMetricPoint(int metricPointIndex, double value, ReadOnl
this.metricPoints[metricPointIndex].UpdateWithExemplar(
value,
tags,
isSampled: true);
offerExemplar: true);
}
else
{
this.metricPoints[metricPointIndex].UpdateWithExemplar(
value,
tags,
isSampled: Activity.Current?.Recorded ?? false);
offerExemplar: Activity.Current?.Recorded ?? false);
}
}

Expand Down
Loading

0 comments on commit bf423cc

Please sign in to comment.