diff options
author | Ivan Topolnjak <ivantopo@gmail.com> | 2015-02-04 05:32:45 +0100 |
---|---|---|
committer | Ivan Topolnjak <ivantopo@gmail.com> | 2015-02-04 05:32:45 +0100 |
commit | 6729c9632245328a007332cdcce7d362584d735a (patch) | |
tree | 46e136bcdc1ed4e41082c67f59a51c270c8ed1c6 /kamon-core/src/main/scala/kamon/metric/EntityRecorder.scala | |
parent | 0eecfae4c80bfbaff6357b12e83bf7641b03cc1a (diff) | |
download | Kamon-6729c9632245328a007332cdcce7d362584d735a.tar.gz Kamon-6729c9632245328a007332cdcce7d362584d735a.tar.bz2 Kamon-6729c9632245328a007332cdcce7d362584d735a.zip |
! core: revised semantics of .register on Metrics module to match our docs.
Diffstat (limited to 'kamon-core/src/main/scala/kamon/metric/EntityRecorder.scala')
-rw-r--r-- | kamon-core/src/main/scala/kamon/metric/EntityRecorder.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kamon-core/src/main/scala/kamon/metric/EntityRecorder.scala b/kamon-core/src/main/scala/kamon/metric/EntityRecorder.scala index a7bba2e1..6e0a4248 100644 --- a/kamon-core/src/main/scala/kamon/metric/EntityRecorder.scala +++ b/kamon-core/src/main/scala/kamon/metric/EntityRecorder.scala @@ -38,7 +38,7 @@ abstract class GenericEntityRecorder(instrumentFactory: InstrumentFactory) exten private val _instruments = TrieMap.empty[MetricKey, Instrument] private def register[T <: Instrument](key: MetricKey, instrument: ⇒ T): T = - _instruments.atomicGetOrElseUpdate(key, instrument).asInstanceOf[T] + _instruments.atomicGetOrElseUpdate(key, instrument, _.cleanup).asInstanceOf[T] protected def histogram(name: String): Histogram = register(HistogramKey(name), instrumentFactory.createHistogram(name)) |