@@ -176,6 +176,8 @@ public static String getHostName() {
176
176
private final boolean scopeStrictMode ;
177
177
private final int scopeIterationKeepAlive ;
178
178
private final int partialFlushMinSpans ;
179
+ private final int traceKeepLatencyThreshold ;
180
+ private final boolean traceKeepLatencyThresholdEnabled ;
179
181
private final boolean traceStrictWritesEnabled ;
180
182
private final boolean logExtractHeaderNames ;
181
183
private final Set <PropagationStyle > propagationStylesToExtract ;
@@ -861,6 +863,12 @@ private Config(final ConfigProvider configProvider, final InstrumenterConfig ins
861
863
? 0
862
864
: configProvider .getInteger (PARTIAL_FLUSH_MIN_SPANS , DEFAULT_PARTIAL_FLUSH_MIN_SPANS );
863
865
866
+ traceKeepLatencyThreshold =
867
+ configProvider .getInteger (
868
+ TRACE_KEEP_LATENCY_THRESHOLD_MS , DEFAULT_TRACE_KEEP_LATENCY_THRESHOLD_MS );
869
+
870
+ traceKeepLatencyThresholdEnabled = !partialFlushEnabled && (traceKeepLatencyThreshold > 0 );
871
+
864
872
traceStrictWritesEnabled = configProvider .getBoolean (TRACE_STRICT_WRITES_ENABLED , false );
865
873
866
874
logExtractHeaderNames =
@@ -2077,6 +2085,14 @@ public int getPartialFlushMinSpans() {
2077
2085
return partialFlushMinSpans ;
2078
2086
}
2079
2087
2088
+ public int getTraceKeepLatencyThreshold () {
2089
+ return traceKeepLatencyThreshold ;
2090
+ }
2091
+
2092
+ public boolean isTraceKeepLatencyThresholdEnabled () {
2093
+ return traceKeepLatencyThresholdEnabled ;
2094
+ }
2095
+
2080
2096
public boolean isTraceStrictWritesEnabled () {
2081
2097
return traceStrictWritesEnabled ;
2082
2098
}
@@ -4164,6 +4180,10 @@ public String toString() {
4164
4180
+ scopeIterationKeepAlive
4165
4181
+ ", partialFlushMinSpans="
4166
4182
+ partialFlushMinSpans
4183
+ + ", traceKeepLatencyThresholdEnabled="
4184
+ + traceKeepLatencyThresholdEnabled
4185
+ + ", traceKeepLatencyThreshold="
4186
+ + traceKeepLatencyThreshold
4167
4187
+ ", traceStrictWritesEnabled="
4168
4188
+ traceStrictWritesEnabled
4169
4189
+ ", tracePropagationStylesToExtract="
0 commit comments