aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Topolnjak <ivantopo@gmail.com>2018-11-30 14:33:58 +0100
committerIvan Topolnjak <ivantopo@gmail.com>2018-11-30 14:33:58 +0100
commitf8410795ca92938e93b3dd5284504e56b8e968d3 (patch)
tree6f1e5953d2684c7c659149beeefa50a962d4f8b7
parente1f2b2dd290625ee1cdd3a8b60ef83c3c41a2c17 (diff)
downloadKamon-f8410795ca92938e93b3dd5284504e56b8e968d3.tar.gz
Kamon-f8410795ca92938e93b3dd5284504e56b8e968d3.tar.bz2
Kamon-f8410795ca92938e93b3dd5284504e56b8e968d3.zip
clean references to scheduled range sampler collections
-rw-r--r--kamon-core/src/main/scala/kamon/metric/Metric.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/kamon-core/src/main/scala/kamon/metric/Metric.scala b/kamon-core/src/main/scala/kamon/metric/Metric.scala
index f63e3d07..a66d1229 100644
--- a/kamon-core/src/main/scala/kamon/metric/Metric.scala
+++ b/kamon-core/src/main/scala/kamon/metric/Metric.scala
@@ -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