Skip to content

Commit

Permalink
clean references to scheduled range sampler collections
Browse files Browse the repository at this point in the history
  • Loading branch information
ivantopo committed Nov 30, 2018
1 parent e1f2b2d commit f841079
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kamon-core/src/main/scala/kamon/metric/Metric.scala
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ private[kamon] final class RangeSamplerMetricImpl(val name: String, val unit: Me
private def removeAndStopSampler(tags: Tags): Boolean = {
val removed = super.remove(tags)
if(removed)
scheduledSamplers.get(tags).foreach(sf => {
scheduledSamplers.remove(tags).foreach(sf => {
Try(sf.cancel(false)).failed.foreach(_ => logger.error("Failed to cancel scheduled sampling for RangeSampler []", tags.prettyPrint()))
})
removed
Expand Down

0 comments on commit f841079

Please sign in to comment.