diff options
Diffstat (limited to 'kamon-core/src/main/scala')
-rw-r--r-- | kamon-core/src/main/scala/kamon/instrumentation/akka/ActorCellInstrumentation.scala | 2 | ||||
-rw-r--r-- | kamon-core/src/main/scala/kamon/metric/MetricsExtension.scala | 2 |
2 files changed, 1 insertions, 3 deletions
diff --git a/kamon-core/src/main/scala/kamon/instrumentation/akka/ActorCellInstrumentation.scala b/kamon-core/src/main/scala/kamon/instrumentation/akka/ActorCellInstrumentation.scala index 5fce4555..446bc487 100644 --- a/kamon-core/src/main/scala/kamon/instrumentation/akka/ActorCellInstrumentation.scala +++ b/kamon-core/src/main/scala/kamon/instrumentation/akka/ActorCellInstrumentation.scala @@ -82,7 +82,6 @@ class ActorCellInstrumentation { val cellWithMetrics = cell.asInstanceOf[ActorCellMetrics] cellWithMetrics.actorMetricsRecorder.map { p ⇒ - cellWithMetrics.mailboxSizeCollectorCancellable.cancel() Kamon(Metrics)(cell.system).unregister(cellWithMetrics.metricIdentity) } } @@ -103,7 +102,6 @@ class ActorCellInstrumentation { trait ActorCellMetrics { var metricIdentity: ActorMetrics = _ var actorMetricsRecorder: Option[ActorMetricsRecorder] = _ - var mailboxSizeCollectorCancellable: Cancellable = _ } @Aspect diff --git a/kamon-core/src/main/scala/kamon/metric/MetricsExtension.scala b/kamon-core/src/main/scala/kamon/metric/MetricsExtension.scala index 00214f51..51cda6b2 100644 --- a/kamon-core/src/main/scala/kamon/metric/MetricsExtension.scala +++ b/kamon-core/src/main/scala/kamon/metric/MetricsExtension.scala @@ -52,7 +52,7 @@ class MetricsExtension(system: ExtendedActorSystem) extends Kamon.Extension { } def unregister(identity: MetricGroupIdentity): Unit = { - storage.remove(identity) + storage.remove(identity).map(_.cleanup) } def subscribe[C <: MetricGroupCategory](category: C, selection: String, subscriber: ActorRef, permanently: Boolean = false): Unit = |