Class TracingOptions


  • public class TracingOptions
    extends java.lang.Object
    Encapsulates all trace-related components and options used by the streaming search Searcher. Provides a DEFAULT static instance which has the following characteristics: - Approximately 1 query every second is traced - Trace level is set to 7 for traced queries - Only emits traces for queries that have timed out and where the elapsed time is at least 2x of the timeout specified in the query itself - Emits traces to the Vespa log - Only 2 traces every 10 seconds may be emitted to the log
    • Field Detail

      • DEFAULT_TRACE_LEVEL_OVERRIDE

        public static final int DEFAULT_TRACE_LEVEL_OVERRIDE
        See Also:
        Constant Field Values
      • TRACE_TIMEOUT_MULTIPLIER_THRESHOLD

        public static final double TRACE_TIMEOUT_MULTIPLIER_THRESHOLD
        See Also:
        Constant Field Values
    • Constructor Detail

      • TracingOptions

        public TracingOptions​(SamplingStrategy samplingStrategy,
                              TraceExporter traceExporter,
                              MonotonicNanoClock clock,
                              int traceLevelOverride,
                              double traceTimeoutMultiplierThreshold)
        Parameters:
        samplingStrategy - used for choosing if a query should have its trace level implicitly altered.
        traceExporter - used for emitting a visitor session trace to someplace it may be debugged later.
        clock - monotonic clock used for relative time tracking.
        traceLevelOverride - if a query is trace-sampled, its traceLevel will be set to this value
        traceTimeoutMultiplierThreshold - only export traces if the elapsed time is greater than the query timeout * this value
    • Method Detail

      • getTraceLevelOverride

        public int getTraceLevelOverride()
      • getTraceTimeoutMultiplierThreshold

        public double getTraceTimeoutMultiplierThreshold()