aboutsummaryrefslogtreecommitdiffstats
path: root/container-search/src/main/java/com/yahoo/vespa/streamingvisitors/tracing/SamplingStrategy.java
blob: 5da627744d7e348bdf7883a96aec653c1e49a90f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.streamingvisitors.tracing;

/**
 * A sampling strategy makes the high-level decision of whether or not a query
 * should be traced.
 *
 * Callers should be able to expect that calling shouldSample() is a cheap operation
 * with little or no underlying locking. This in turn means that the sampling strategy
 * may be consulted for each query with minimal overhead.
 */
public interface SamplingStrategy {

    boolean shouldSample();

}