diff --git a/zipkin-server/src/main/scala/com/twitter/zipkin/collector/processor/SamplerProcessorFilter.scala b/zipkin-server/src/main/scala/com/twitter/zipkin/collector/processor/SamplerProcessorFilter.scala index ba972bbf35d..19e26371343 100644 --- a/zipkin-server/src/main/scala/com/twitter/zipkin/collector/processor/SamplerProcessorFilter.scala +++ b/zipkin-server/src/main/scala/com/twitter/zipkin/collector/processor/SamplerProcessorFilter.scala @@ -33,7 +33,10 @@ class SamplerProcessorFilter(sampler: GlobalSampler) extends ProcessorFilter[Seq * If the span was created with debug mode on we guarantee that it will be * stored no matter what our sampler tells us */ - if (span.debug || sampler(span.traceId)) { + if (span.debug) { + Stats.incr("debugflag") + Some(span) + } else if (sampler(span.traceId)) { Some(span) } else { None