diff options
author | Ivan Topolnjak <ivantopo@gmail.com> | 2015-07-27 13:41:26 +0200 |
---|---|---|
committer | Ivan Topolnjak <ivantopo@gmail.com> | 2015-07-27 13:41:26 +0200 |
commit | b6d0ba8000fb31bb292eb9f8e4cd8e79e631876e (patch) | |
tree | e6f06099be74555b74207b3121fe6d980945c6ac /kamon-core/src/main | |
parent | fee00711243a69ae007ae0f1bb6a72fe3de2c964 (diff) | |
parent | dee441d00bfa796a7a1509ac828c6b1b7aabb389 (diff) | |
download | Kamon-b6d0ba8000fb31bb292eb9f8e4cd8e79e631876e.tar.gz Kamon-b6d0ba8000fb31bb292eb9f8e4cd8e79e631876e.tar.bz2 Kamon-b6d0ba8000fb31bb292eb9f8e4cd8e79e631876e.zip |
Merge pull request #236 from sattvik/counters-with-units
+ core: Allow creation of counters with units
Diffstat (limited to 'kamon-core/src/main')
-rw-r--r-- | kamon-core/src/main/scala/kamon/metric/EntityRecorder.scala | 3 |
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()) |