-
Notifications
You must be signed in to change notification settings - Fork 308
Stable Config parsing: Treat empty environment variable or process argument values as empty string #8759
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
Conversation
…values in template variable
BenchmarksStartupParameters
See matching parameters
SummaryFound 3 performance improvements and 2 performance regressions! Performance is the same for 52 metrics, 14 unstable metrics.
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.50.0-SNAPSHOT~4213b94000, baseline=1.50.0-SNAPSHOT~ad6d5fef42
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.029 s) : 0, 1029315
Total [baseline] (10.493 s) : 0, 10493408
Agent [candidate] (1.026 s) : 0, 1025680
Total [candidate] (10.523 s) : 0, 10523362
section appsec
Agent [baseline] (1.161 s) : 0, 1161367
Total [baseline] (10.688 s) : 0, 10687664
Agent [candidate] (1.172 s) : 0, 1171743
Total [candidate] (10.685 s) : 0, 10685029
section iast
Agent [baseline] (1.15 s) : 0, 1149861
Total [baseline] (10.906 s) : 0, 10905749
Agent [candidate] (1.161 s) : 0, 1160779
Total [candidate] (10.882 s) : 0, 10882054
section profiling
Agent [baseline] (1.29 s) : 0, 1289727
Total [baseline] (11.012 s) : 0, 11012408
Agent [candidate] (1.267 s) : 0, 1267271
Total [candidate] (10.807 s) : 0, 10806754
gantt
title petclinic - break down per module: candidate=1.50.0-SNAPSHOT~4213b94000, baseline=1.50.0-SNAPSHOT~ad6d5fef42
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (688.327 ms) : 0, 688327
BytebuddyAgent [candidate] (686.277 ms) : 0, 686277
GlobalTracer [baseline] (241.508 ms) : 0, 241508
GlobalTracer [candidate] (241.296 ms) : 0, 241296
AppSec [baseline] (55.497 ms) : 0, 55497
AppSec [candidate] (56.559 ms) : 0, 56559
Debugger [baseline] (8.381 ms) : 0, 8381
Debugger [candidate] (6.169 ms) : 0, 6169
Remote Config [baseline] (692.837 µs) : 0, 693
Remote Config [candidate] (729.856 µs) : 0, 730
Telemetry [baseline] (11.23 ms) : 0, 11230
Telemetry [candidate] (11.139 ms) : 0, 11139
section appsec
BytebuddyAgent [baseline] (700.348 ms) : 0, 700348
BytebuddyAgent [candidate] (706.921 ms) : 0, 706921
GlobalTracer [baseline] (236.368 ms) : 0, 236368
GlobalTracer [candidate] (239.513 ms) : 0, 239513
AppSec [baseline] (176.291 ms) : 0, 176291
AppSec [candidate] (176.62 ms) : 0, 176620
Debugger [baseline] (5.971 ms) : 0, 5971
Debugger [candidate] (5.984 ms) : 0, 5984
Remote Config [baseline] (629.137 µs) : 0, 629
Remote Config [candidate] (643.385 µs) : 0, 643
Telemetry [baseline] (7.424 ms) : 0, 7424
Telemetry [candidate] (7.336 ms) : 0, 7336
IAST [baseline] (21.641 ms) : 0, 21641
IAST [candidate] (22.141 ms) : 0, 22141
section iast
BytebuddyAgent [baseline] (802.804 ms) : 0, 802804
BytebuddyAgent [candidate] (810.623 ms) : 0, 810623
GlobalTracer [baseline] (230.621 ms) : 0, 230621
GlobalTracer [candidate] (232.837 ms) : 0, 232837
AppSec [baseline] (50.225 ms) : 0, 50225
AppSec [candidate] (52.097 ms) : 0, 52097
Debugger [baseline] (5.907 ms) : 0, 5907
Debugger [candidate] (5.975 ms) : 0, 5975
Remote Config [baseline] (603.397 µs) : 0, 603
Remote Config [candidate] (591.97 µs) : 0, 592
Telemetry [baseline] (7.875 ms) : 0, 7875
Telemetry [candidate] (7.956 ms) : 0, 7956
IAST [baseline] (28.265 ms) : 0, 28265
IAST [candidate] (27.023 ms) : 0, 27023
section profiling
BytebuddyAgent [baseline] (678.926 ms) : 0, 678926
BytebuddyAgent [candidate] (675.465 ms) : 0, 675465
GlobalTracer [baseline] (379.58 ms) : 0, 379580
GlobalTracer [candidate] (359.943 ms) : 0, 359943
AppSec [baseline] (54.747 ms) : 0, 54747
AppSec [candidate] (61.797 ms) : 0, 61797
Debugger [baseline] (6.18 ms) : 0, 6180
Debugger [candidate] (6.079 ms) : 0, 6079
Remote Config [baseline] (668.26 µs) : 0, 668
Remote Config [candidate] (638.853 µs) : 0, 639
Telemetry [baseline] (8.2 ms) : 0, 8200
Telemetry [candidate] (8.087 ms) : 0, 8087
ProfilingAgent [baseline] (110.498 ms) : 0, 110498
ProfilingAgent [candidate] (104.459 ms) : 0, 104459
Profiling [baseline] (110.525 ms) : 0, 110525
Profiling [candidate] (104.484 ms) : 0, 104484
Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.50.0-SNAPSHOT~4213b94000, baseline=1.50.0-SNAPSHOT~ad6d5fef42
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.021 s) : 0, 1021006
Total [baseline] (8.646 s) : 0, 8645950
Agent [candidate] (1.024 s) : 0, 1024231
Total [candidate] (8.652 s) : 0, 8651705
section iast
Agent [baseline] (1.149 s) : 0, 1149351
Total [baseline] (9.217 s) : 0, 9217424
Agent [candidate] (1.151 s) : 0, 1150549
Total [candidate] (9.243 s) : 0, 9243259
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.151 s) : 0, 1150809
Total [baseline] (9.173 s) : 0, 9172563
Agent [candidate] (1.149 s) : 0, 1148846
Total [candidate] (9.189 s) : 0, 9188858
section iast_TELEMETRY_OFF
Agent [baseline] (1.151 s) : 0, 1150900
Total [baseline] (9.197 s) : 0, 9196888
Agent [candidate] (1.147 s) : 0, 1146819
Total [candidate] (9.216 s) : 0, 9216152
gantt
title insecure-bank - break down per module: candidate=1.50.0-SNAPSHOT~4213b94000, baseline=1.50.0-SNAPSHOT~ad6d5fef42
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (682.966 ms) : 0, 682966
BytebuddyAgent [candidate] (684.784 ms) : 0, 684784
GlobalTracer [baseline] (240.105 ms) : 0, 240105
GlobalTracer [candidate] (241.332 ms) : 0, 241332
AppSec [baseline] (55.43 ms) : 0, 55430
AppSec [candidate] (57.051 ms) : 0, 57051
Debugger [baseline] (7.603 ms) : 0, 7603
Debugger [candidate] (6.283 ms) : 0, 6283
Remote Config [baseline] (686.004 µs) : 0, 686
Remote Config [candidate] (743.848 µs) : 0, 744
Telemetry [baseline] (10.557 ms) : 0, 10557
Telemetry [candidate] (10.534 ms) : 0, 10534
section iast
BytebuddyAgent [baseline] (802.466 ms) : 0, 802466
BytebuddyAgent [candidate] (803.166 ms) : 0, 803166
GlobalTracer [baseline] (230.275 ms) : 0, 230275
GlobalTracer [candidate] (231.243 ms) : 0, 231243
AppSec [baseline] (49.593 ms) : 0, 49593
AppSec [candidate] (50.066 ms) : 0, 50066
Debugger [baseline] (5.921 ms) : 0, 5921
Debugger [candidate] (5.898 ms) : 0, 5898
Remote Config [baseline] (602.556 µs) : 0, 603
Remote Config [candidate] (647.806 µs) : 0, 648
Telemetry [baseline] (7.865 ms) : 0, 7865
Telemetry [candidate] (7.849 ms) : 0, 7849
IAST [baseline] (29.161 ms) : 0, 29161
IAST [candidate] (28.186 ms) : 0, 28186
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (803.068 ms) : 0, 803068
BytebuddyAgent [candidate] (801.446 ms) : 0, 801446
GlobalTracer [baseline] (230.916 ms) : 0, 230916
GlobalTracer [candidate] (231.11 ms) : 0, 231110
AppSec [baseline] (49.525 ms) : 0, 49525
AppSec [candidate] (51.606 ms) : 0, 51606
Debugger [baseline] (5.906 ms) : 0, 5906
Debugger [candidate] (5.94 ms) : 0, 5940
Remote Config [baseline] (600.004 µs) : 0, 600
Remote Config [candidate] (591.272 µs) : 0, 591
Telemetry [baseline] (7.981 ms) : 0, 7981
Telemetry [candidate] (7.864 ms) : 0, 7864
IAST [baseline] (28.504 ms) : 0, 28504
IAST [candidate] (26.79 ms) : 0, 26790
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (804.597 ms) : 0, 804597
BytebuddyAgent [candidate] (799.682 ms) : 0, 799682
GlobalTracer [baseline] (230.138 ms) : 0, 230138
GlobalTracer [candidate] (231.025 ms) : 0, 231025
AppSec [baseline] (54.258 ms) : 0, 54258
AppSec [candidate] (49.386 ms) : 0, 49386
Debugger [baseline] (5.936 ms) : 0, 5936
Debugger [candidate] (5.963 ms) : 0, 5963
Remote Config [baseline] (609.432 µs) : 0, 609
Remote Config [candidate] (602.542 µs) : 0, 603
Telemetry [baseline] (7.806 ms) : 0, 7806
Telemetry [candidate] (7.831 ms) : 0, 7831
IAST [baseline] (23.929 ms) : 0, 23929
IAST [candidate] (28.777 ms) : 0, 28777
LoadParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 12 metrics, 18 unstable metrics. Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.50.0-SNAPSHOT~4213b94000, baseline=1.50.0-SNAPSHOT~ad6d5fef42
dateFormat X
axisFormat %s
section baseline
no_agent (1.369 ms) : 1349, 1389
. : milestone, 1369,
appsec (1.723 ms) : 1699, 1746
. : milestone, 1723,
appsec_no_iast (1.729 ms) : 1706, 1752
. : milestone, 1729,
code_origins (1.679 ms) : 1652, 1705
. : milestone, 1679,
iast (1.532 ms) : 1509, 1556
. : milestone, 1532,
profiling (1.522 ms) : 1499, 1546
. : milestone, 1522,
tracing (1.506 ms) : 1482, 1531
. : milestone, 1506,
section candidate
no_agent (1.351 ms) : 1330, 1372
. : milestone, 1351,
appsec (1.751 ms) : 1727, 1774
. : milestone, 1751,
appsec_no_iast (1.751 ms) : 1727, 1775
. : milestone, 1751,
code_origins (1.692 ms) : 1664, 1719
. : milestone, 1692,
iast (1.545 ms) : 1520, 1570
. : milestone, 1545,
profiling (1.521 ms) : 1498, 1545
. : milestone, 1521,
tracing (1.488 ms) : 1464, 1513
. : milestone, 1488,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.50.0-SNAPSHOT~4213b94000, baseline=1.50.0-SNAPSHOT~ad6d5fef42
dateFormat X
axisFormat %s
section baseline
no_agent (386.576 µs) : 367, 406
. : milestone, 387,
iast (533.469 µs) : 510, 557
. : milestone, 533,
iast_FULL (737.524 µs) : 715, 760
. : milestone, 738,
iast_GLOBAL (564.004 µs) : 542, 586
. : milestone, 564,
iast_HARDCODED_SECRET_DISABLED (530.499 µs) : 508, 553
. : milestone, 530,
iast_INACTIVE (473.709 µs) : 451, 496
. : milestone, 474,
iast_TELEMETRY_OFF (505.492 µs) : 482, 529
. : milestone, 505,
tracing (466.848 µs) : 444, 490
. : milestone, 467,
section candidate
no_agent (387.858 µs) : 368, 408
. : milestone, 388,
iast (526.528 µs) : 505, 548
. : milestone, 527,
iast_FULL (733.71 µs) : 712, 756
. : milestone, 734,
iast_GLOBAL (585.063 µs) : 562, 608
. : milestone, 585,
iast_HARDCODED_SECRET_DISABLED (522.128 µs) : 500, 544
. : milestone, 522,
iast_INACTIVE (472.341 µs) : 449, 495
. : milestone, 472,
iast_TELEMETRY_OFF (514.432 µs) : 492, 537
. : milestone, 514,
tracing (461.671 µs) : 440, 484
. : milestone, 462,
DacapoParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 12 metrics, 0 unstable metrics. Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.50.0-SNAPSHOT~4213b94000, baseline=1.50.0-SNAPSHOT~ad6d5fef42
dateFormat X
axisFormat %s
section baseline
no_agent (1.47 ms) : 1459, 1482
. : milestone, 1470,
appsec (2.384 ms) : 2336, 2431
. : milestone, 2384,
iast (2.174 ms) : 2113, 2234
. : milestone, 2174,
iast_GLOBAL (2.219 ms) : 2158, 2280
. : milestone, 2219,
profiling (2.023 ms) : 1973, 2072
. : milestone, 2023,
tracing (1.995 ms) : 1948, 2043
. : milestone, 1995,
section candidate
no_agent (1.472 ms) : 1460, 1483
. : milestone, 1472,
appsec (2.385 ms) : 2337, 2433
. : milestone, 2385,
iast (2.168 ms) : 2107, 2228
. : milestone, 2168,
iast_GLOBAL (2.212 ms) : 2151, 2273
. : milestone, 2212,
profiling (2.04 ms) : 1991, 2090
. : milestone, 2040,
tracing (1.994 ms) : 1948, 2041
. : milestone, 1994,
Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.50.0-SNAPSHOT~4213b94000, baseline=1.50.0-SNAPSHOT~ad6d5fef42
dateFormat X
axisFormat %s
section baseline
no_agent (14.957 s) : 14957000, 14957000
. : milestone, 14957000,
appsec (15.103 s) : 15103000, 15103000
. : milestone, 15103000,
iast (19.047 s) : 19047000, 19047000
. : milestone, 19047000,
iast_GLOBAL (18.01 s) : 18010000, 18010000
. : milestone, 18010000,
profiling (15.051 s) : 15051000, 15051000
. : milestone, 15051000,
tracing (15.244 s) : 15244000, 15244000
. : milestone, 15244000,
section candidate
no_agent (15.559 s) : 15559000, 15559000
. : milestone, 15559000,
appsec (14.962 s) : 14962000, 14962000
. : milestone, 14962000,
iast (19.052 s) : 19052000, 19052000
. : milestone, 19052000,
iast_GLOBAL (18.066 s) : 18066000, 18066000
. : milestone, 18066000,
profiling (15.011 s) : 15011000, 15011000
. : milestone, 15011000,
tracing (14.89 s) : 14890000, 14890000
. : milestone, 14890000,
|
Hi! 👋 Thanks for your pull request! 🎉 To help us review it, please make sure to:
If you need help, please check our contributing guidelines. |
internal-api/src/main/java/datadog/trace/bootstrap/config/provider/StableConfigParser.java
Outdated
Show resolved
Hide resolved
internal-api/src/main/java/datadog/trace/bootstrap/config/provider/StableConfigParser.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 but I'd recommend leaving out the debug messages for now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
What Does This Do
Modifies stable config file parsing logic to return
""
instead of"UNDEFINED"
.Motivation
While
"UNDEFINED"
may have been meaningful or helpful for string-based configuration values, it doesn't make sense for non-string configurations. Non-string values can't transform"UNDEFINED"
, so they fall back to their defaults anyway. This change simplifies the behavior by returning an empty string (""
) and logging a debug message to indicate what's happening.In an environment where
DD_ENV
is not set....DD_SERVICE: {{environment_variables: ['DD_ENV']}}
resolves toDD_SERVICE: ""
. As a result, the default service name is usedDD_SERVICE: prefix-{{environment_variables: ['DD_ENV']}}-suffix
resolves toDD_SERVICE: "prefix--suffix"
. As a result,"prefix--suffix"
is the service nameDD_PROFILING_ENABLED: {{environment_variables: ['DD_ENV']}}
resolves toDD_PROFILING_ENABLED: ""
. As a result, the default setting (false
) is usedAdditional Notes
Contributor Checklist
type:
and (comp:
orinst:
) labels in addition to any usefull labelsclose
,fix
or any linking keywords when referencing an issue.Use
solves
instead, and assign the PR milestone to the issueJira ticket: [PROJ-IDENT]