diff options
author | Ivan Topolnjak <ivantopo@gmail.com> | 2018-01-17 02:14:27 +0100 |
---|---|---|
committer | Ivan Topolnjak <ivantopo@gmail.com> | 2018-01-17 02:14:27 +0100 |
commit | a02215f4327fc11ed8e5066ada22c1d5938d849e (patch) | |
tree | 90f1a61535b9cad97091217cb04b9c621c854fd3 /kamon-testkit/src/main/scala/kamon/testkit/Reconfigure.scala | |
parent | ed6504f67549184c86e3b6fe752985179912f35c (diff) | |
download | Kamon-a02215f4327fc11ed8e5066ada22c1d5938d849e.tar.gz Kamon-a02215f4327fc11ed8e5066ada22c1d5938d849e.tar.bz2 Kamon-a02215f4327fc11ed8e5066ada22c1d5938d849e.zip |
allow metric filtering when adding a metrics reporter
Diffstat (limited to 'kamon-testkit/src/main/scala/kamon/testkit/Reconfigure.scala')
-rw-r--r-- | kamon-testkit/src/main/scala/kamon/testkit/Reconfigure.scala | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/kamon-testkit/src/main/scala/kamon/testkit/Reconfigure.scala b/kamon-testkit/src/main/scala/kamon/testkit/Reconfigure.scala index 98dd47ae..c70fadb8 100644 --- a/kamon-testkit/src/main/scala/kamon/testkit/Reconfigure.scala +++ b/kamon-testkit/src/main/scala/kamon/testkit/Reconfigure.scala @@ -20,6 +20,10 @@ import kamon.Kamon trait Reconfigure { + def enableFastMetricFlushing(): Unit = { + applyConfig("kamon.metric.tick-interval = 1 millisecond") + } + def enableFastSpanFlushing(): Unit = { applyConfig("kamon.trace.tick-interval = 1 millisecond") } @@ -44,6 +48,10 @@ trait Reconfigure { Kamon.reconfigure(ConfigFactory.parseString(configString).withFallback(Kamon.config())) } + def resetConfig(): Unit = { + Kamon.reconfigure(ConfigFactory.load()) + } + } |