Class TracingOptions
- java.lang.Object
-
- com.yahoo.vespa.streamingvisitors.TracingOptions
-
public class TracingOptions extends 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 Summary
Fields Modifier and Type Field Description static TracingOptions
DEFAULT
static int
DEFAULT_TRACE_LEVEL_OVERRIDE
static double
TRACE_TIMEOUT_MULTIPLIER_THRESHOLD
-
Constructor Summary
Constructors Constructor Description TracingOptions(SamplingStrategy samplingStrategy, TraceExporter traceExporter, MonotonicNanoClock clock, int traceLevelOverride, double traceTimeoutMultiplierThreshold)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MonotonicNanoClock
getClock()
SamplingStrategy
getSamplingStrategy()
TraceExporter
getTraceExporter()
int
getTraceLevelOverride()
double
getTraceTimeoutMultiplierThreshold()
-
-
-
Field Detail
-
DEFAULT
public static final TracingOptions DEFAULT
-
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 valuetraceTimeoutMultiplierThreshold
- only export traces if the elapsed time is greater than the query timeout * this value
-
-
Method Detail
-
getSamplingStrategy
public SamplingStrategy getSamplingStrategy()
-
getTraceExporter
public TraceExporter getTraceExporter()
-
getClock
public MonotonicNanoClock getClock()
-
getTraceLevelOverride
public int getTraceLevelOverride()
-
getTraceTimeoutMultiplierThreshold
public double getTraceTimeoutMultiplierThreshold()
-
-