diff options
Diffstat (limited to 'kamon-playground/src/main')
-rw-r--r-- | kamon-playground/src/main/resources/application.conf | 4 | ||||
-rw-r--r-- | kamon-playground/src/main/scala/test/SimpleRequestProcessor.scala | 14 |
2 files changed, 16 insertions, 2 deletions
diff --git a/kamon-playground/src/main/resources/application.conf b/kamon-playground/src/main/resources/application.conf index e9f73954..bac3c97e 100644 --- a/kamon-playground/src/main/resources/application.conf +++ b/kamon-playground/src/main/resources/application.conf @@ -1,7 +1,7 @@ akka { loglevel = INFO - extensions = ["kamon.newrelic.NewRelic"] + extensions = ["kamon.logreporter.LogReporter"] actor { debug { @@ -25,7 +25,7 @@ kamon { kamon { metrics { - tick-interval = 1 second + tick-interval = 10 second filters = [ { diff --git a/kamon-playground/src/main/scala/test/SimpleRequestProcessor.scala b/kamon-playground/src/main/scala/test/SimpleRequestProcessor.scala index 84621927..301a9bbd 100644 --- a/kamon-playground/src/main/scala/test/SimpleRequestProcessor.scala +++ b/kamon-playground/src/main/scala/test/SimpleRequestProcessor.scala @@ -51,6 +51,19 @@ object SimpleRequestProcessor extends App with SimpleRoutingApp with RequestBuil implicit val timeout = Timeout(30 seconds) + val counter = Kamon(UserMetrics).registerCounter("requests") + Kamon(UserMetrics).registerCounter("requests-2") + Kamon(UserMetrics).registerCounter("requests-3") + + Kamon(UserMetrics).registerHistogram("histogram-1") + Kamon(UserMetrics).registerHistogram("histogram-2") + + Kamon(UserMetrics).registerMinMaxCounter("min-max-counter-1") + Kamon(UserMetrics).registerMinMaxCounter("min-max-counter-2") + Kamon(UserMetrics).registerMinMaxCounter("min-max-counter-3") + + //Kamon(UserMetrics).registerGauge("test-gauge")(() => 10L) + val pipeline = sendReceive val replier = system.actorOf(Props[Replier].withRouter(RoundRobinPool(nrOfInstances = 2)), "replier") val random = new Random() @@ -92,6 +105,7 @@ object SimpleRequestProcessor extends App with SimpleRoutingApp with RequestBuil path("future") { traceName("OK-Future") { dynamic { + counter.increment() complete(Future { "OK" }) } } |