Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change SymDB config #6120

Merged
merged 2 commits into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public static synchronized void run(
} else {
log.debug("No configuration poller available from SharedCommunicationObjects");
}
if (config.getDebuggerSymbolEnabled()) {
if (config.isDebuggerSymbolEnabled() && config.isDebuggerSymbolForceUpload()) {
instrumentation.addTransformer(
new SymbolExtractionTransformer(debuggerSink.getSymbolSink(), config));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ public final class ConfigDefaults {
static final boolean DEFAULT_DEBUGGER_INSTRUMENT_THE_WORLD = false;
static final int DEFAULT_DEBUGGER_CAPTURE_TIMEOUT = 100; // milliseconds
static final boolean DEFAULT_DEBUGGER_SYMBOL_ENABLED = false;
static final boolean DEFAULT_DEBUGGER_SYMBOL_FORCE_UPLOAD = false;
static final int DEFAULT_DEBUGGER_SYMBOL_FLUSH_THRESHOLD = 100; // nb of classes

static final boolean DEFAULT_TRACE_REPORT_HOSTNAME = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ public final class DebuggerConfig {
public static final String DEBUGGER_REDACTED_IDENTIFIERS =
"dynamic.instrumentation.redacted.identifiers";
public static final String DEBUGGER_REDACTED_TYPES = "dynamic.instrumentation.redacted.types";
public static final String DEBUGGER_SYMBOL_ENABLED = "dynamic.instrumentation.symbol.enabled";
public static final String DEBUGGER_SYMBOL_INCLUDES = "dynamic.instrumentation.symbol.includes";
public static final String DEBUGGER_SYMBOL_FLUSH_THRESHOLD =
"dynamic.instrumentation.symbol.flush.threshold";
public static final String DEBUGGER_SYMBOL_ENABLED = "symbol.database.upload.enabled";
public static final String DEBUGGER_SYMBOL_FORCE_UPLOAD = "internal.force.symbol.database.upload";
public static final String DEBUGGER_SYMBOL_INCLUDES = "symbol.database.includes";
public static final String DEBUGGER_SYMBOL_FLUSH_THRESHOLD = "symbol.database.flush.threshold";

private DebuggerConfig() {}
}
12 changes: 11 additions & 1 deletion internal-api/src/main/java/datadog/trace/api/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
import static datadog.trace.api.ConfigDefaults.DEFAULT_DEBUGGER_POLL_INTERVAL;
import static datadog.trace.api.ConfigDefaults.DEFAULT_DEBUGGER_SYMBOL_ENABLED;
import static datadog.trace.api.ConfigDefaults.DEFAULT_DEBUGGER_SYMBOL_FLUSH_THRESHOLD;
import static datadog.trace.api.ConfigDefaults.DEFAULT_DEBUGGER_SYMBOL_FORCE_UPLOAD;
import static datadog.trace.api.ConfigDefaults.DEFAULT_DEBUGGER_UPLOAD_BATCH_SIZE;
import static datadog.trace.api.ConfigDefaults.DEFAULT_DEBUGGER_UPLOAD_FLUSH_INTERVAL;
import static datadog.trace.api.ConfigDefaults.DEFAULT_DEBUGGER_UPLOAD_TIMEOUT;
Expand Down Expand Up @@ -185,6 +186,7 @@
import static datadog.trace.api.config.DebuggerConfig.DEBUGGER_REDACTED_TYPES;
import static datadog.trace.api.config.DebuggerConfig.DEBUGGER_SYMBOL_ENABLED;
import static datadog.trace.api.config.DebuggerConfig.DEBUGGER_SYMBOL_FLUSH_THRESHOLD;
import static datadog.trace.api.config.DebuggerConfig.DEBUGGER_SYMBOL_FORCE_UPLOAD;
import static datadog.trace.api.config.DebuggerConfig.DEBUGGER_SYMBOL_INCLUDES;
import static datadog.trace.api.config.DebuggerConfig.DEBUGGER_UPLOAD_BATCH_SIZE;
import static datadog.trace.api.config.DebuggerConfig.DEBUGGER_UPLOAD_FLUSH_INTERVAL;
Expand Down Expand Up @@ -738,6 +740,7 @@ static class HostNameHolder {
private final String debuggerRedactedIdentifiers;
private final String debuggerRedactedTypes;
private final boolean debuggerSymbolEnabled;
private final boolean debuggerSymbolForceUpload;
private final String debuggerSymbolIncludes;
private final int debuggerSymbolFlushThreshold;

Expand Down Expand Up @@ -1686,6 +1689,9 @@ private Config(final ConfigProvider configProvider, final InstrumenterConfig ins
debuggerRedactedTypes = configProvider.getString(DEBUGGER_REDACTED_TYPES, null);
debuggerSymbolEnabled =
configProvider.getBoolean(DEBUGGER_SYMBOL_ENABLED, DEFAULT_DEBUGGER_SYMBOL_ENABLED);
debuggerSymbolForceUpload =
configProvider.getBoolean(
DEBUGGER_SYMBOL_FORCE_UPLOAD, DEFAULT_DEBUGGER_SYMBOL_FORCE_UPLOAD);
debuggerSymbolIncludes = configProvider.getString(DEBUGGER_SYMBOL_INCLUDES, null);
debuggerSymbolFlushThreshold =
configProvider.getInteger(
Expand Down Expand Up @@ -2776,7 +2782,11 @@ public int getDebuggerCaptureTimeout() {
return debuggerCaptureTimeout;
}

public boolean getDebuggerSymbolEnabled() {
public boolean isDebuggerSymbolEnabled() {
return debuggerSymbolEnabled;
}

public boolean isDebuggerSymbolForceUpload() {
return debuggerSymbolEnabled;
}

Expand Down
Loading