diff options
author | Ivan Topolnjak <ivantopo@gmail.com> | 2016-03-14 21:59:02 +0100 |
---|---|---|
committer | Ivan Topolnjak <ivantopo@gmail.com> | 2016-03-14 21:59:02 +0100 |
commit | aa93757d615d805a9b6c30541055601b0df22951 (patch) | |
tree | e0e12d34daaa09a29b5df8880d96d6b4df95fbde /kamon-core/src/main/scala/kamon/metric | |
parent | 05c38b4aba959c0c9aa4def450fb734a03b4e4b9 (diff) | |
download | Kamon-aa93757d615d805a9b6c30541055601b0df22951.tar.gz Kamon-aa93757d615d805a9b6c30541055601b0df22951.tar.bz2 Kamon-aa93757d615d805a9b6c30541055601b0df22951.zip |
introduce selective instrumentation for akka actors.
Diffstat (limited to 'kamon-core/src/main/scala/kamon/metric')
-rw-r--r-- | kamon-core/src/main/scala/kamon/metric/EntityRecorder.scala | 6 |
1 files changed, 6 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 15e20d1a..e1e89b79 100644 --- a/kamon-core/src/main/scala/kamon/metric/EntityRecorder.scala +++ b/kamon-core/src/main/scala/kamon/metric/EntityRecorder.scala @@ -34,6 +34,12 @@ trait EntityRecorderFactory[T <: EntityRecorder] { def createRecorder(instrumentFactory: InstrumentFactory): T } +abstract class EntityRecorderFactoryCompanion[T <: EntityRecorder](val category: String, builder: (InstrumentFactory) => T) + extends EntityRecorderFactory[T] { + + def createRecorder(instrumentFactory: InstrumentFactory): T = builder(instrumentFactory) +} + object EntityRecorderFactory { def apply[T <: EntityRecorder](entityCategory: String, factory: InstrumentFactory ⇒ T): EntityRecorderFactory[T] = new EntityRecorderFactory[T] { |