Skip to content

Commit 929c372

Browse files
committed
Apply the standard nomenclature to the stacktrace configs
1 parent 14822bf commit 929c372

File tree

3 files changed

+29
-10
lines changed

3 files changed

+29
-10
lines changed

dd-trace-api/src/main/java/datadog/trace/api/config/AppSecConfig.java

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,15 @@ public final class AppSecConfig {
3030

3131
public static final String APPSEC_SCA_ENABLED = "appsec.sca.enabled";
3232
public static final String APPSEC_RASP_ENABLED = "appsec.rasp.enabled";
33-
public static final String APPSEC_STACK_TRACE_ENABLED = "appsec.stacktrace.enabled";
34-
public static final String APPSEC_MAX_STACK_TRACES = "appsec.max.stacktraces";
35-
public static final String APPSEC_MAX_STACK_TRACE_DEPTH = "appsec.max.stacktrace.depth";
33+
public static final String APPSEC_STACK_TRACE_ENABLED = "appsec.stack-trace.enabled";
34+
public static final String APPSEC_STACKTRACE_ENABLED =
35+
"appsec.stacktrace.enabled"; // old non-standard as a fallback alias
36+
public static final String APPSEC_MAX_STACK_TRACES = "appsec.max.stack-traces";
37+
public static final String APPSEC_MAX_STACKTRACES =
38+
"appsec.max.stacktraces"; // old non-standard as a fallback alias
39+
public static final String APPSEC_MAX_STACK_TRACE_DEPTH = "appsec.max.stack-trace.depth";
40+
public static final String APPSEC_MAX_STACKTRACE_DEPTH =
41+
"appsec.max.stacktrace.depth"; // old non-standard as a fallback alias
3642

3743
public static final String APPSEC_STANDALONE_ENABLED = "experimental.appsec.standalone.enabled";
3844

dd-trace-api/src/main/java/datadog/trace/api/config/IastConfig.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ public final class IastConfig {
1616
public static final String IAST_REDACTION_ENABLED = "iast.redaction.enabled";
1717
public static final String IAST_REDACTION_NAME_PATTERN = "iast.redaction.name.pattern";
1818
public static final String IAST_REDACTION_VALUE_PATTERN = "iast.redaction.value.pattern";
19-
public static final String IAST_STACKTRACE_LEAK_SUPPRESS = "iast.stacktrace-leak.suppress";
19+
public static final String IAST_STACK_TRACE_LEAK_SUPPRESS = "iast.stack-trace-leak.suppress";
20+
public static final String IAST_STACKTRACE_LEAK_SUPPRESS =
21+
"iast.stacktrace-leak.suppress"; // old non-standard as a fallback alias
2022
public static final String IAST_HARDCODED_SECRET_ENABLED = "iast.hardcoded-secret.enabled";
2123
public static final String IAST_MAX_RANGE_COUNT = "iast.max-range-count";
2224
public static final String IAST_TRUNCATION_MAX_VALUE_LENGTH = "iast.truncation.max.value.length";
@@ -26,7 +28,9 @@ public final class IastConfig {
2628
public static final String IAST_SOURCE_MAPPING_MAX_SIZE = "iast.source-mapping.max-size";
2729
public static final String IAST_EXPERIMENTAL_PROPAGATION_ENABLED =
2830
"iast.experimental.propagation.enabled";
29-
public static final String IAST_STACK_TRACE_ENABLED = "iast.stacktrace.enabled";
31+
public static final String IAST_STACK_TRACE_ENABLED = "iast.stack-trace.enabled";
32+
public static final String IAST_STACKTRACE_ENABLED =
33+
"iast.stacktrace.enabled"; // old non-standard as a fallback alias
3034
public static final String IAST_SECURITY_CONTROLS_CONFIGURATION =
3135
"iast.security-controls.configuration";
3236
public static final String IAST_DB_ROWS_TO_TAINT = "iast.db.rows-to-taint";

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

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1284,12 +1284,18 @@ PROFILING_DATADOG_PROFILER_ENABLED, isDatadogProfilerSafeInCurrentEnvironment())
12841284
appSecStandaloneEnabled = configProvider.getBoolean(APPSEC_STANDALONE_ENABLED, false);
12851285
appSecRaspEnabled = configProvider.getBoolean(APPSEC_RASP_ENABLED, DEFAULT_APPSEC_RASP_ENABLED);
12861286
appSecStackTraceEnabled =
1287-
configProvider.getBoolean(APPSEC_STACK_TRACE_ENABLED, DEFAULT_APPSEC_STACK_TRACE_ENABLED);
1287+
configProvider.getBoolean(
1288+
APPSEC_STACK_TRACE_ENABLED,
1289+
DEFAULT_APPSEC_STACK_TRACE_ENABLED,
1290+
APPSEC_STACKTRACE_ENABLED);
12881291
appSecMaxStackTraces =
1289-
configProvider.getInteger(APPSEC_MAX_STACK_TRACES, DEFAULT_APPSEC_MAX_STACK_TRACES);
1292+
configProvider.getInteger(
1293+
APPSEC_MAX_STACK_TRACES, DEFAULT_APPSEC_MAX_STACK_TRACES, APPSEC_MAX_STACKTRACES);
12901294
appSecMaxStackTraceDepth =
12911295
configProvider.getInteger(
1292-
APPSEC_MAX_STACK_TRACE_DEPTH, DEFAULT_APPSEC_MAX_STACK_TRACE_DEPTH);
1296+
APPSEC_MAX_STACK_TRACE_DEPTH,
1297+
DEFAULT_APPSEC_MAX_STACK_TRACE_DEPTH,
1298+
APPSEC_MAX_STACKTRACE_DEPTH);
12931299
apiSecurityEnabled =
12941300
configProvider.getBoolean(
12951301
API_SECURITY_ENABLED, DEFAULT_API_SECURITY_ENABLED, API_SECURITY_ENABLED_EXPERIMENTAL);
@@ -1330,7 +1336,9 @@ PROFILING_DATADOG_PROFILER_ENABLED, isDatadogProfilerSafeInCurrentEnvironment())
13301336
iastMaxRangeCount = iastDetectionMode.getIastMaxRangeCount(configProvider);
13311337
iastStacktraceLeakSuppress =
13321338
configProvider.getBoolean(
1333-
IAST_STACKTRACE_LEAK_SUPPRESS, DEFAULT_IAST_STACKTRACE_LEAK_SUPPRESS);
1339+
IAST_STACK_TRACE_LEAK_SUPPRESS,
1340+
DEFAULT_IAST_STACKTRACE_LEAK_SUPPRESS,
1341+
IAST_STACKTRACE_LEAK_SUPPRESS);
13341342
iastHardcodedSecretEnabled =
13351343
configProvider.getBoolean(
13361344
IAST_HARDCODED_SECRET_ENABLED, DEFAULT_IAST_HARDCODED_SECRET_ENABLED);
@@ -1340,7 +1348,8 @@ PROFILING_DATADOG_PROFILER_ENABLED, isDatadogProfilerSafeInCurrentEnvironment())
13401348
iastSourceMappingEnabled = configProvider.getBoolean(IAST_SOURCE_MAPPING_ENABLED, false);
13411349
iastSourceMappingMaxSize = configProvider.getInteger(IAST_SOURCE_MAPPING_MAX_SIZE, 1000);
13421350
iastStackTraceEnabled =
1343-
configProvider.getBoolean(IAST_STACK_TRACE_ENABLED, DEFAULT_IAST_STACK_TRACE_ENABLED);
1351+
configProvider.getBoolean(
1352+
IAST_STACK_TRACE_ENABLED, DEFAULT_IAST_STACK_TRACE_ENABLED, IAST_STACKTRACE_ENABLED);
13441353
iastExperimentalPropagationEnabled =
13451354
configProvider.getBoolean(IAST_EXPERIMENTAL_PROPAGATION_ENABLED, false);
13461355
iastSecurityControlsConfiguration =

0 commit comments

Comments
 (0)