Skip to content

Commit

Permalink
warn when tail sampling is enabled without span-reporting-delay
Browse files Browse the repository at this point in the history
  • Loading branch information
ivantopo committed Nov 16, 2021
1 parent d92118f commit 519dd7d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions core/kamon-core/src/main/scala/kamon/trace/Tracer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,12 @@ class Tracer(initialConfig: Config, clock: Clock, contextStorage: ContextStorage
latencyThresholdNanos = traceConfig.getDuration("tail-sampler.latency-threshold").toNanos
)

if(tailSamplerSettings.enabled && delayedSpanReportingDelay.isZero) {
_logger.warn(
"Enabling tail sampling without any sensible span-reporting-delay setting will probably lead to incomplete " +
"traces. Consider setting span-reporting-delay to a value slightly above your application's timeout setting")
}

if(_traceReporterQueueSize != traceReporterQueueSize) {
// By simply changing the buffer we might be dropping Spans that have not been collected yet by the reporters.
// Since reconfigures are very unlikely to happen beyond application startup this might not be a problem.
Expand Down

0 comments on commit 519dd7d

Please sign in to comment.