Skip to content

Commit b872e7f

Browse files
committed
Set default value for partial trace flush to 1k
This should help reduce memory impact of large traces and reduce risk if scope is opened and never closed.
1 parent 3b3f685 commit b872e7f

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

dd-trace-api/src/main/java/datadog/trace/api/Config.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public class Config {
9191
private static final Set<Integer> DEFAULT_HTTP_CLIENT_ERROR_STATUSES =
9292
parseIntegerRangeSet("400-499", "default");
9393
private static final boolean DEFAULT_HTTP_CLIENT_SPLIT_BY_DOMAIN = false;
94-
private static final int DEFAULT_PARTIAL_FLUSH_MIN_SPANS = 0;
94+
private static final int DEFAULT_PARTIAL_FLUSH_MIN_SPANS = 1000;
9595
private static final String DEFAULT_PROPAGATION_STYLE_EXTRACT = PropagationStyle.DATADOG.name();
9696
private static final String DEFAULT_PROPAGATION_STYLE_INJECT = PropagationStyle.DATADOG.name();
9797
private static final boolean DEFAULT_JMX_FETCH_ENABLED = false;

dd-trace-api/src/test/groovy/datadog/trace/api/ConfigTest.groovy

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ class ConfigTest extends Specification {
7474
config.httpServerErrorStatuses == (500..599).toSet()
7575
config.httpClientErrorStatuses == (400..499).toSet()
7676
config.httpClientSplitByDomain == false
77-
config.partialFlushMinSpans == 0
77+
config.partialFlushMinSpans == 1000
7878
config.runtimeContextFieldInjection == true
7979
config.propagationStylesToExtract.toList() == [Config.PropagationStyle.DATADOG]
8080
config.propagationStylesToInject.toList() == [Config.PropagationStyle.DATADOG]
@@ -172,7 +172,7 @@ class ConfigTest extends Specification {
172172
System.setProperty(PREFIX + HTTP_SERVER_ERROR_STATUSES, "123-456,457,124-125,122")
173173
System.setProperty(PREFIX + HTTP_CLIENT_ERROR_STATUSES, "111")
174174
System.setProperty(PREFIX + HTTP_CLIENT_HOST_SPLIT_BY_DOMAIN, "true")
175-
System.setProperty(PREFIX + PARTIAL_FLUSH_MIN_SPANS, "15")
175+
System.setProperty(PREFIX + PARTIAL_FLUSH_MIN_SPANS, "25")
176176
System.setProperty(PREFIX + RUNTIME_CONTEXT_FIELD_INJECTION, "false")
177177
System.setProperty(PREFIX + PROPAGATION_STYLE_EXTRACT, "Datadog, B3")
178178
System.setProperty(PREFIX + PROPAGATION_STYLE_INJECT, "B3, Datadog")
@@ -201,7 +201,7 @@ class ConfigTest extends Specification {
201201
config.httpServerErrorStatuses == (122..457).toSet()
202202
config.httpClientErrorStatuses == (111..111).toSet()
203203
config.httpClientSplitByDomain == true
204-
config.partialFlushMinSpans == 15
204+
config.partialFlushMinSpans == 25
205205
config.runtimeContextFieldInjection == false
206206
config.propagationStylesToExtract.toList() == [Config.PropagationStyle.DATADOG, Config.PropagationStyle.B3]
207207
config.propagationStylesToInject.toList() == [Config.PropagationStyle.B3, Config.PropagationStyle.DATADOG]

0 commit comments

Comments
 (0)