diff options
author | Ivan Topolnjak <ivantopo@gmail.com> | 2014-12-08 15:47:44 +0100 |
---|---|---|
committer | Ivan Topolnjak <ivantopo@gmail.com> | 2014-12-08 15:47:44 +0100 |
commit | 3bd38b53e2da34a1c880206a0d4e89219517d5ad (patch) | |
tree | 7bba2e56018655fa2b0cb1d2065ec99ed8c9669a | |
parent | 9b0bf679201c6831855ca54e20d92e5495789943 (diff) | |
parent | 893b56e38152c2170da691d4f3b7d187f474e3a1 (diff) | |
download | Kamon-3bd38b53e2da34a1c880206a0d4e89219517d5ad.tar.gz Kamon-3bd38b53e2da34a1c880206a0d4e89219517d5ad.tar.bz2 Kamon-3bd38b53e2da34a1c880206a0d4e89219517d5ad.zip |
Merge pull request #129 from magro/threshold-sampler
= core: Fix ThresholdSampler to use minimum-elapsed-time setting
-rw-r--r-- | kamon-core/src/main/resources/reference.conf | 2 | ||||
-rw-r--r-- | kamon-core/src/main/scala/kamon/trace/TraceExtension.scala | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/kamon-core/src/main/resources/reference.conf b/kamon-core/src/main/resources/reference.conf index d7276b53..b9039b73 100644 --- a/kamon-core/src/main/resources/reference.conf +++ b/kamon-core/src/main/resources/reference.conf @@ -154,7 +154,7 @@ kamon { # Gather tracing information for all traces but only report those whose elapsed-time is equal or greated to the # .minimum-elapsed-time setting. threshold-sampler { - threshold = 1 second + minimum-elapsed-time = 1 second } incubator { diff --git a/kamon-core/src/main/scala/kamon/trace/TraceExtension.scala b/kamon-core/src/main/scala/kamon/trace/TraceExtension.scala index 8bd9384a..7d734b8c 100644 --- a/kamon-core/src/main/scala/kamon/trace/TraceExtension.scala +++ b/kamon-core/src/main/scala/kamon/trace/TraceExtension.scala @@ -16,6 +16,8 @@ package kamon.trace +import java.util.concurrent.TimeUnit + import akka.actor._ import akka.actor import akka.event.Logging @@ -39,7 +41,7 @@ class TraceExtension(system: ExtendedActorSystem) extends Kamon.Extension { case "all" ⇒ SampleAll case "random" ⇒ new RandomSampler(config.getInt("random-sampler.chance")) case "ordered" ⇒ new OrderedSampler(config.getInt("ordered-sampler.interval")) - case "threshold" ⇒ new RandomSampler(config.getInt("threshold-sampler.threshold")) + case "threshold" ⇒ new ThresholdSampler(config.getDuration("threshold-sampler.minimum-elapsed-time", TimeUnit.NANOSECONDS)) } val log = Logging(system, "TraceExtension") |