Skip to content

Commit

Permalink
Do not return previous exemplar in sampler
Browse files Browse the repository at this point in the history
This avoids prom4cats unecessarily updating the exemplar ref when the
exemplar is not sampled. If this returns `None` then the ref won't be
updated and the previous will remain intact
  • Loading branch information
janstenpickle committed Sep 6, 2023
1 parent b19798f commit 5595cad
Showing 1 changed file with 0 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ object Trace4CatsExemplarSampler extends Trace4CatsExemplarSamplerInstances {
.filter(
_.timestamp.toEpochMilli - prev.timestamp.toEpochMilli > minRetentionIntervalMs
)
.orElse(previous)
case None => next
}
}
Expand Down

0 comments on commit 5595cad

Please sign in to comment.