aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Topolnjak <ivantopo@gmail.com>2015-07-27 13:41:26 +0200
committerIvan Topolnjak <ivantopo@gmail.com>2015-07-27 13:41:26 +0200
commitb382b4dc9a45baf1a6ae665a4c042527d8082cd1 (patch)
treeb7a36670694ceef2e72833186fe28ddb3399ad82
parent0814fe68b5e8d8f6bf1b3055be2a49b92ed0355f (diff)
parent6ecc3343b2f79308d0edd02ef02ed818c30ec581 (diff)
downloadKamon-b382b4dc9a45baf1a6ae665a4c042527d8082cd1.tar.gz
Kamon-b382b4dc9a45baf1a6ae665a4c042527d8082cd1.tar.bz2
Kamon-b382b4dc9a45baf1a6ae665a4c042527d8082cd1.zip
Merge pull request #236 from sattvik/counters-with-units
+ core: Allow creation of counters with units
-rw-r--r--kamon-core/src/main/scala/kamon/metric/EntityRecorder.scala3
1 files changed, 3 insertions, 0 deletions
diff --git a/kamon-core/src/main/scala/kamon/metric/EntityRecorder.scala b/kamon-core/src/main/scala/kamon/metric/EntityRecorder.scala
index 65dafa9a..15e20d1a 100644
--- a/kamon-core/src/main/scala/kamon/metric/EntityRecorder.scala
+++ b/kamon-core/src/main/scala/kamon/metric/EntityRecorder.scala
@@ -204,6 +204,9 @@ abstract class GenericEntityRecorder(instrumentFactory: InstrumentFactory) exten
protected def counter(name: String): Counter =
register(CounterKey(name, UnitOfMeasurement.Unknown), instrumentFactory.createCounter())
+ protected def counter(name: String, unitOfMeasurement: UnitOfMeasurement): Counter =
+ register(CounterKey(name, unitOfMeasurement), instrumentFactory.createCounter())
+
protected def counter(key: CounterKey): Counter =
register(key, instrumentFactory.createCounter())