File tree 4 files changed +12
-2
lines changed
dd-trace-api/src/main/java/datadog/trace/api
main/java/datadog/trace/core/traceinterceptor
test/groovy/datadog/trace/core/traceinterceptor
4 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,7 @@ public final class ConfigDefaults {
69
69
static final boolean DEFAULT_DB_CLIENT_HOST_SPLIT_BY_INSTANCE_TYPE_SUFFIX = false ;
70
70
static final boolean DEFAULT_DB_CLIENT_HOST_SPLIT_BY_HOST = false ;
71
71
static final String DEFAULT_DB_DBM_PROPAGATION_MODE_MODE = "disabled" ;
72
+ // Default value is set to -1, it disables the latency trace interceptor
72
73
static final int DEFAULT_TRACE_LATENCY_INTERCEPTOR_VALUE = -1 ;
73
74
static final int DEFAULT_SCOPE_DEPTH_LIMIT = 100 ;
74
75
static final int DEFAULT_SCOPE_ITERATION_KEEP_ALIVE = 30 ; // in seconds
Original file line number Diff line number Diff line change @@ -73,6 +73,7 @@ public final class TracerConfig {
73
73
public static final String TRACE_HTTP_CLIENT_ERROR_STATUSES = "trace.http.client.error.statuses" ;
74
74
75
75
public static final String SPLIT_BY_TAGS = "trace.split-by-tags" ;
76
+ // trace latency interceptor value should be in ms
76
77
public static final String TRACE_LATENCY_INTERCEPTOR_VALUE = "trace.latency.interceptor.value" ;
77
78
public static final String SCOPE_DEPTH_LIMIT = "trace.scope.depth.limit" ;
78
79
public static final String SCOPE_STRICT_MODE = "trace.scope.strict.mode" ;
Original file line number Diff line number Diff line change 9
9
import org .slf4j .Logger ;
10
10
import org .slf4j .LoggerFactory ;
11
11
12
+ // This trace latency interceptor is disabled by default.
13
+ // We can activate it by setting the value of dd.trace.latency.interceptor.value to a positive value
14
+ // This value should be in milliseconds and this interceptor will retain any local trace who has a
15
+ // root
16
+ // span duration greater than this value.
17
+ // The activation of this interceptor is ignored if partial flush is enabled.
18
+ // Note that since we're changing the sampling priority at the end of local trace, there is no
19
+ // guarantee to get complete traces,
20
+ // since the original sampling priority for this trace may have been already propagated.
21
+
12
22
public class LatencyTraceInterceptor extends AbstractTraceInterceptor {
13
23
private static final Logger log = LoggerFactory .getLogger (LatencyTraceInterceptor .class );
14
24
// duration configured in ms, need to be converted in nano seconds
Original file line number Diff line number Diff line change @@ -45,6 +45,4 @@ class LatencyTraceInterceptorTest extends DDCoreSpecification {
45
45
" false" | " 200" | DDTags . MANUAL_KEEP | 300 | 2
46
46
" false" | " 200" | DDTags . MANUAL_DROP | 300 | 2
47
47
}
48
-
49
-
50
48
}
You can’t perform that action at this time.
0 commit comments