Skip to content

Commit

Permalink
Nits
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeBlanch committed Feb 27, 2024
1 parent 0cfcce7 commit 6f3070a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/OpenTelemetry/Metrics/MetricPoint.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ internal MetricPoint(
}
catch
{
// todo: Log that the factory on view threw an exception
// TODO : Log that the factory on view threw an exception, once view exposes that capability
reservoir = null;
}

Expand All @@ -81,9 +81,9 @@ internal MetricPoint(
{
this.mpComponents = new MetricPointOptionalComponents();
this.mpComponents.HistogramBuckets = new HistogramBuckets(histogramExplicitBounds);
if (isExemplarEnabled)
if (isExemplarEnabled && reservoir == null)
{
reservoir ??= new AlignedHistogramBucketExemplarReservoir(histogramExplicitBounds!.Length);
reservoir = new AlignedHistogramBucketExemplarReservoir(histogramExplicitBounds!.Length);
}
}
else if (this.aggType == AggregationType.Histogram ||
Expand Down

0 comments on commit 6f3070a

Please sign in to comment.