-
Notifications
You must be signed in to change notification settings - Fork 300
Split system properties into key-vals in CLIHelper and support template variables in YamlParser #8690
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
base: master
Are you sure you want to change the base?
Conversation
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 59 metrics, 12 unstable metrics. Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.49.0-SNAPSHOT~9caeb5daf3, baseline=1.49.0-SNAPSHOT~e8762d2392
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.066 s) : 0, 1065741
Total [baseline] (8.726 s) : 0, 8726237
Agent [candidate] (1.061 s) : 0, 1060590
Total [candidate] (8.685 s) : 0, 8685292
section iast
Agent [baseline] (1.185 s) : 0, 1185139
Total [baseline] (9.277 s) : 0, 9276730
Agent [candidate] (1.185 s) : 0, 1185010
Total [candidate] (9.268 s) : 0, 9268228
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.182 s) : 0, 1182499
Total [baseline] (9.205 s) : 0, 9204665
Agent [candidate] (1.198 s) : 0, 1197835
Total [candidate] (9.311 s) : 0, 9311212
section iast_TELEMETRY_OFF
Agent [baseline] (1.178 s) : 0, 1178245
Total [baseline] (9.307 s) : 0, 9306975
Agent [candidate] (1.189 s) : 0, 1189419
Total [candidate] (9.296 s) : 0, 9295663
gantt
title insecure-bank - break down per module: candidate=1.49.0-SNAPSHOT~9caeb5daf3, baseline=1.49.0-SNAPSHOT~e8762d2392
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (726.834 ms) : 0, 726834
BytebuddyAgent [candidate] (722.416 ms) : 0, 722416
GlobalTracer [baseline] (240.817 ms) : 0, 240817
GlobalTracer [candidate] (239.207 ms) : 0, 239207
AppSec [baseline] (56.355 ms) : 0, 56355
AppSec [candidate] (56.713 ms) : 0, 56713
Debugger [baseline] (4.432 ms) : 0, 4432
Debugger [candidate] (5.92 ms) : 0, 5920
Remote Config [baseline] (3.705 ms) : 0, 3705
Remote Config [candidate] (730.02 µs) : 0, 730
Telemetry [baseline] (10.081 ms) : 0, 10081
Telemetry [candidate] (12.152 ms) : 0, 12152
section iast
BytebuddyAgent [baseline] (839.401 ms) : 0, 839401
BytebuddyAgent [candidate] (839.718 ms) : 0, 839718
GlobalTracer [baseline] (230.063 ms) : 0, 230063
GlobalTracer [candidate] (229.892 ms) : 0, 229892
IAST [baseline] (24.425 ms) : 0, 24425
IAST [candidate] (23.654 ms) : 0, 23654
AppSec [baseline] (54.193 ms) : 0, 54193
AppSec [candidate] (54.919 ms) : 0, 54919
Debugger [baseline] (4.275 ms) : 0, 4275
Debugger [candidate] (4.177 ms) : 0, 4177
Remote Config [baseline] (618.828 µs) : 0, 619
Remote Config [candidate] (596.772 µs) : 0, 597
Telemetry [baseline] (8.754 ms) : 0, 8754
Telemetry [candidate] (8.563 ms) : 0, 8563
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (837.741 ms) : 0, 837741
BytebuddyAgent [candidate] (849.206 ms) : 0, 849206
GlobalTracer [baseline] (229.041 ms) : 0, 229041
GlobalTracer [candidate] (231.669 ms) : 0, 231669
IAST [baseline] (25.28 ms) : 0, 25280
IAST [candidate] (23.955 ms) : 0, 23955
AppSec [baseline] (53.425 ms) : 0, 53425
AppSec [candidate] (55.779 ms) : 0, 55779
Debugger [baseline] (4.188 ms) : 0, 4188
Debugger [candidate] (4.265 ms) : 0, 4265
Remote Config [baseline] (623.828 µs) : 0, 624
Remote Config [candidate] (624.779 µs) : 0, 625
Telemetry [baseline] (8.711 ms) : 0, 8711
Telemetry [candidate] (8.774 ms) : 0, 8774
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (834.509 ms) : 0, 834509
BytebuddyAgent [candidate] (842.647 ms) : 0, 842647
GlobalTracer [baseline] (228.809 ms) : 0, 228809
GlobalTracer [candidate] (231.025 ms) : 0, 231025
IAST [baseline] (22.407 ms) : 0, 22407
IAST [candidate] (23.369 ms) : 0, 23369
AppSec [baseline] (55.76 ms) : 0, 55760
AppSec [candidate] (55.356 ms) : 0, 55356
Debugger [baseline] (4.128 ms) : 0, 4128
Debugger [candidate] (4.195 ms) : 0, 4195
Remote Config [baseline] (618.284 µs) : 0, 618
Remote Config [candidate] (634.141 µs) : 0, 634
Telemetry [baseline] (8.718 ms) : 0, 8718
Telemetry [candidate] (8.69 ms) : 0, 8690
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.49.0-SNAPSHOT~9caeb5daf3, baseline=1.49.0-SNAPSHOT~e8762d2392
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.067 s) : 0, 1067123
Total [baseline] (10.458 s) : 0, 10458004
Agent [candidate] (1.06 s) : 0, 1059655
Total [candidate] (10.505 s) : 0, 10504778
section appsec
Agent [baseline] (1.197 s) : 0, 1197360
Total [baseline] (10.788 s) : 0, 10787984
Agent [candidate] (1.196 s) : 0, 1195998
Total [candidate] (10.785 s) : 0, 10784768
section iast
Agent [baseline] (1.188 s) : 0, 1188163
Total [baseline] (11.057 s) : 0, 11057314
Agent [candidate] (1.19 s) : 0, 1190120
Total [candidate] (11.035 s) : 0, 11034531
section profiling
Agent [baseline] (1.292 s) : 0, 1292171
Total [baseline] (10.912 s) : 0, 10911622
Agent [candidate] (1.298 s) : 0, 1297633
Total [candidate] (10.96 s) : 0, 10959909
gantt
title petclinic - break down per module: candidate=1.49.0-SNAPSHOT~9caeb5daf3, baseline=1.49.0-SNAPSHOT~e8762d2392
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (726.041 ms) : 0, 726041
BytebuddyAgent [candidate] (721.166 ms) : 0, 721166
GlobalTracer [baseline] (241.063 ms) : 0, 241063
GlobalTracer [candidate] (239.936 ms) : 0, 239936
AppSec [baseline] (55.136 ms) : 0, 55136
AppSec [candidate] (55.128 ms) : 0, 55128
Debugger [baseline] (4.393 ms) : 0, 4393
Debugger [candidate] (4.394 ms) : 0, 4394
Remote Config [baseline] (702.832 µs) : 0, 703
Remote Config [candidate] (689.004 µs) : 0, 689
Telemetry [baseline] (16.207 ms) : 0, 16207
Telemetry [candidate] (14.94 ms) : 0, 14940
section appsec
BytebuddyAgent [baseline] (737.905 ms) : 0, 737905
BytebuddyAgent [candidate] (737.804 ms) : 0, 737804
GlobalTracer [baseline] (236.24 ms) : 0, 236240
GlobalTracer [candidate] (235.435 ms) : 0, 235435
AppSec [baseline] (175.848 ms) : 0, 175848
AppSec [candidate] (175.486 ms) : 0, 175486
Debugger [baseline] (4.219 ms) : 0, 4219
Debugger [candidate] (4.193 ms) : 0, 4193
Remote Config [baseline] (635.196 µs) : 0, 635
Remote Config [candidate] (636.872 µs) : 0, 637
Telemetry [baseline] (8.165 ms) : 0, 8165
Telemetry [candidate] (8.159 ms) : 0, 8159
IAST [baseline] (21.949 ms) : 0, 21949
IAST [candidate] (21.754 ms) : 0, 21754
section iast
BytebuddyAgent [baseline] (840.519 ms) : 0, 840519
BytebuddyAgent [candidate] (844.197 ms) : 0, 844197
GlobalTracer [baseline] (231.122 ms) : 0, 231122
GlobalTracer [candidate] (230.106 ms) : 0, 230106
AppSec [baseline] (54.768 ms) : 0, 54768
AppSec [candidate] (55.111 ms) : 0, 55111
Debugger [baseline] (4.296 ms) : 0, 4296
Debugger [candidate] (4.189 ms) : 0, 4189
Remote Config [baseline] (610.284 µs) : 0, 610
Remote Config [candidate] (610.387 µs) : 0, 610
Telemetry [baseline] (8.834 ms) : 0, 8834
Telemetry [candidate] (8.694 ms) : 0, 8694
IAST [baseline] (24.615 ms) : 0, 24615
IAST [candidate] (23.694 ms) : 0, 23694
section profiling
ProfilingAgent [baseline] (101.101 ms) : 0, 101101
ProfilingAgent [candidate] (102.701 ms) : 0, 102701
BytebuddyAgent [baseline] (712.192 ms) : 0, 712192
BytebuddyAgent [candidate] (714.736 ms) : 0, 714736
GlobalTracer [baseline] (360.491 ms) : 0, 360491
GlobalTracer [candidate] (362.684 ms) : 0, 362684
AppSec [baseline] (54.125 ms) : 0, 54125
AppSec [candidate] (53.156 ms) : 0, 53156
Debugger [baseline] (4.373 ms) : 0, 4373
Debugger [candidate] (4.401 ms) : 0, 4401
Remote Config [baseline] (661.278 µs) : 0, 661
Remote Config [candidate] (649.192 µs) : 0, 649
Telemetry [baseline] (8.929 ms) : 0, 8929
Telemetry [candidate] (8.996 ms) : 0, 8996
Profiling [baseline] (101.126 ms) : 0, 101126
Profiling [candidate] (102.727 ms) : 0, 102727
LoadParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 13 metrics, 17 unstable metrics. Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.49.0-SNAPSHOT~9caeb5daf3, baseline=1.49.0-SNAPSHOT~e8762d2392
dateFormat X
axisFormat %s
section baseline
no_agent (387.369 µs) : 368, 407
. : milestone, 387,
iast (519.132 µs) : 497, 541
. : milestone, 519,
iast_FULL (734.377 µs) : 712, 757
. : milestone, 734,
iast_GLOBAL (563.137 µs) : 541, 585
. : milestone, 563,
iast_HARDCODED_SECRET_DISABLED (516.51 µs) : 495, 538
. : milestone, 517,
iast_INACTIVE (466.64 µs) : 445, 488
. : milestone, 467,
iast_TELEMETRY_OFF (505.444 µs) : 484, 527
. : milestone, 505,
tracing (463.341 µs) : 442, 485
. : milestone, 463,
section candidate
no_agent (381.534 µs) : 361, 402
. : milestone, 382,
iast (509.111 µs) : 487, 531
. : milestone, 509,
iast_FULL (729.112 µs) : 707, 751
. : milestone, 729,
iast_GLOBAL (553.819 µs) : 532, 576
. : milestone, 554,
iast_HARDCODED_SECRET_DISABLED (511.484 µs) : 490, 533
. : milestone, 511,
iast_INACTIVE (471.586 µs) : 450, 494
. : milestone, 472,
iast_TELEMETRY_OFF (501.866 µs) : 480, 524
. : milestone, 502,
tracing (462.709 µs) : 442, 483
. : milestone, 463,
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.49.0-SNAPSHOT~9caeb5daf3, baseline=1.49.0-SNAPSHOT~e8762d2392
dateFormat X
axisFormat %s
section baseline
no_agent (1.356 ms) : 1337, 1375
. : milestone, 1356,
appsec (1.768 ms) : 1744, 1792
. : milestone, 1768,
appsec_no_iast (1.732 ms) : 1709, 1756
. : milestone, 1732,
code_origins (1.695 ms) : 1669, 1721
. : milestone, 1695,
iast (1.515 ms) : 1491, 1540
. : milestone, 1515,
profiling (1.525 ms) : 1502, 1548
. : milestone, 1525,
tracing (1.508 ms) : 1483, 1534
. : milestone, 1508,
section candidate
no_agent (1.371 ms) : 1351, 1390
. : milestone, 1371,
appsec (1.736 ms) : 1712, 1760
. : milestone, 1736,
appsec_no_iast (1.736 ms) : 1712, 1760
. : milestone, 1736,
code_origins (1.696 ms) : 1668, 1723
. : milestone, 1696,
iast (1.511 ms) : 1487, 1536
. : milestone, 1511,
profiling (1.489 ms) : 1465, 1513
. : milestone, 1489,
tracing (1.497 ms) : 1472, 1522
. : milestone, 1497,
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.49.0-SNAPSHOT~9caeb5daf3, baseline=1.49.0-SNAPSHOT~e8762d2392
dateFormat X
axisFormat %s
section baseline
no_agent (1.473 ms) : 1461, 1484
. : milestone, 1473,
appsec (2.344 ms) : 2301, 2388
. : milestone, 2344,
iast (2.126 ms) : 2069, 2182
. : milestone, 2126,
iast_GLOBAL (2.176 ms) : 2120, 2232
. : milestone, 2176,
profiling (1.988 ms) : 1944, 2032
. : milestone, 1988,
tracing (1.961 ms) : 1918, 2003
. : milestone, 1961,
section candidate
no_agent (1.474 ms) : 1462, 1485
. : milestone, 1474,
appsec (2.345 ms) : 2301, 2388
. : milestone, 2345,
iast (2.137 ms) : 2081, 2193
. : milestone, 2137,
iast_GLOBAL (2.169 ms) : 2113, 2225
. : milestone, 2169,
profiling (1.983 ms) : 1939, 2027
. : milestone, 1983,
tracing (1.961 ms) : 1919, 2003
. : milestone, 1961,
Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.49.0-SNAPSHOT~9caeb5daf3, baseline=1.49.0-SNAPSHOT~e8762d2392
dateFormat X
axisFormat %s
section baseline
no_agent (15.294 s) : 15294000, 15294000
. : milestone, 15294000,
appsec (15.087 s) : 15087000, 15087000
. : milestone, 15087000,
iast (18.271 s) : 18271000, 18271000
. : milestone, 18271000,
iast_GLOBAL (18.019 s) : 18019000, 18019000
. : milestone, 18019000,
profiling (14.855 s) : 14855000, 14855000
. : milestone, 14855000,
tracing (15.065 s) : 15065000, 15065000
. : milestone, 15065000,
section candidate
no_agent (15.594 s) : 15594000, 15594000
. : milestone, 15594000,
appsec (15.114 s) : 15114000, 15114000
. : milestone, 15114000,
iast (18.573 s) : 18573000, 18573000
. : milestone, 18573000,
iast_GLOBAL (18.072 s) : 18072000, 18072000
. : milestone, 18072000,
profiling (15.147 s) : 15147000, 15147000
. : milestone, 15147000,
tracing (15.31 s) : 15310000, 15310000
. : milestone, 15310000,
|
// TODO: Modify CLIHelper to parse key-vals on JAVA_AGENT_ARGUMENT arguments, so we don't | ||
// have to do the parsing here. |
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.
Nothing is stopping me from making this change in CLIHelper.parseVmArgs now; the only reason I did not go ahead and do it is to avoid introducing unnecessary complexity / expanding the changes in this PR outside of its intended scope.
|
||
import datadog.trace.test.util.DDSpecification | ||
|
||
class YamlParserTest extends DDSpecification{ |
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.
These tests are in progress. I want to use helper methods from another test class, but blocked on how best to do this: [slack link]
I wrote helper functions inside a test class on the internal-api path that I'd like to use in other test classes, at other paths. These methods are already used in another test file at the same path (example), but now I'd like to use those same helper functions inside the components path.
Where is the best place to store these helper functions? Is there some kind of global test-util directory for cases like this? Or, would I maybe put them on the DDSpecification class?
Hi! 👋 Thanks for your pull request! 🎉 To help us review it, please make sure to:
If you need help, please check our contributing guidelines. |
What Does This Do
This PR adds support for matching system property keys in the Stable Configuration selector when those properties include values. For example,
key: "-Darg1"
will now match a Java process running with the-Darg1=value
system property. It also introduces support for template variables in the Stable Configuration file schema, allowing resolution of process argument values and environment variable values. See reference.Detailed Changes
CLIHelper:
YamlParser:
{{process_arguments['-<process_argument_key>']}}
or{{environment_variables['<env_var_key>']}}
Notes & Limitations:
Parsing of non-system property JVM arguments into key-value pairs is out of scope for this PR. These arguments will be stored as-is with an empty string as their value. I made the decision to support only System Property values to avoid introducing unnecessary complexity.
As a result:
Motivation
To support Stable Configuration, users should be able to target services based on a System Property, regardless of its value. E.g,
-Darg1
should match processes running with-Darg1=abcd
.Additional 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]