-
Notifications
You must be signed in to change notification settings - Fork 290
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
Add Parameter to only inject data jobs for particular java commands #7366
Conversation
BenchmarksStartupParameters
See matching parameters
SummaryFound 1 performance improvements and 0 performance regressions! Performance is the same for 45 metrics, 17 unstable metrics.
Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.38.0-SNAPSHOT~430807e1d2, baseline=1.38.0-SNAPSHOT~1d41c00244
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.054 s) : 0, 1054345
Total [baseline] (8.492 s) : 0, 8491813
Agent [candidate] (1.05 s) : 0, 1050172
Total [candidate] (8.49 s) : 0, 8489904
section iast
Agent [baseline] (1.172 s) : 0, 1171579
Total [baseline] (8.969 s) : 0, 8969109
Agent [candidate] (1.18 s) : 0, 1180010
Total [candidate] (9.012 s) : 0, 9012276
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.17 s) : 0, 1170338
Total [baseline] (8.924 s) : 0, 8923936
Agent [candidate] (1.179 s) : 0, 1179165
Total [candidate] (8.916 s) : 0, 8916427
section iast_TELEMETRY_OFF
Agent [baseline] (1.166 s) : 0, 1165959
Total [baseline] (8.95 s) : 0, 8949636
Agent [candidate] (1.185 s) : 0, 1184817
Total [candidate] (8.959 s) : 0, 8959381
gantt
title insecure-bank - break down per module: candidate=1.38.0-SNAPSHOT~430807e1d2, baseline=1.38.0-SNAPSHOT~1d41c00244
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (675.666 ms) : 0, 675666
BytebuddyAgent [candidate] (671.403 ms) : 0, 671403
GlobalTracer [baseline] (306.672 ms) : 0, 306672
GlobalTracer [candidate] (306.861 ms) : 0, 306861
AppSec [baseline] (50.366 ms) : 0, 50366
AppSec [candidate] (50.094 ms) : 0, 50094
Remote Config [baseline] (682.817 µs) : 0, 683
Remote Config [candidate] (690.416 µs) : 0, 690
Telemetry [baseline] (7.37 ms) : 0, 7370
Telemetry [candidate] (7.618 ms) : 0, 7618
section iast
BytebuddyAgent [baseline] (781.816 ms) : 0, 781816
BytebuddyAgent [candidate] (788.467 ms) : 0, 788467
GlobalTracer [baseline] (294.866 ms) : 0, 294866
GlobalTracer [candidate] (297.398 ms) : 0, 297398
AppSec [baseline] (50.282 ms) : 0, 50282
AppSec [candidate] (50.576 ms) : 0, 50576
Remote Config [baseline] (574.085 µs) : 0, 574
Remote Config [candidate] (655.324 µs) : 0, 655
Telemetry [baseline] (7.861 ms) : 0, 7861
Telemetry [candidate] (7.223 ms) : 0, 7223
IAST [baseline] (22.72 ms) : 0, 22720
IAST [candidate] (22.129 ms) : 0, 22129
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (781.555 ms) : 0, 781555
BytebuddyAgent [candidate] (787.326 ms) : 0, 787326
GlobalTracer [baseline] (295.081 ms) : 0, 295081
GlobalTracer [candidate] (296.336 ms) : 0, 296336
AppSec [baseline] (49.77 ms) : 0, 49770
AppSec [candidate] (51.739 ms) : 0, 51739
Remote Config [baseline] (582.517 µs) : 0, 583
Remote Config [candidate] (572.05 µs) : 0, 572
Telemetry [baseline] (7.014 ms) : 0, 7014
Telemetry [candidate] (6.962 ms) : 0, 6962
IAST [baseline] (22.865 ms) : 0, 22865
IAST [candidate] (22.596 ms) : 0, 22596
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (778.576 ms) : 0, 778576
BytebuddyAgent [candidate] (790.384 ms) : 0, 790384
GlobalTracer [baseline] (294.878 ms) : 0, 294878
GlobalTracer [candidate] (299.369 ms) : 0, 299369
AppSec [baseline] (46.812 ms) : 0, 46812
AppSec [candidate] (47.498 ms) : 0, 47498
Remote Config [baseline] (622.403 µs) : 0, 622
Remote Config [candidate] (583.479 µs) : 0, 583
Telemetry [baseline] (7.019 ms) : 0, 7019
Telemetry [candidate] (7.732 ms) : 0, 7732
IAST [baseline] (24.559 ms) : 0, 24559
IAST [candidate] (25.56 ms) : 0, 25560
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.38.0-SNAPSHOT~430807e1d2, baseline=1.38.0-SNAPSHOT~1d41c00244
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.05 s) : 0, 1050357
Total [baseline] (10.402 s) : 0, 10402486
Agent [candidate] (1.046 s) : 0, 1045828
Total [candidate] (10.31 s) : 0, 10309500
section appsec
Agent [baseline] (1.169 s) : 0, 1168690
Total [baseline] (10.501 s) : 0, 10501182
Agent [candidate] (1.168 s) : 0, 1168162
Total [candidate] (10.482 s) : 0, 10481878
section iast
Agent [baseline] (1.175 s) : 0, 1174699
Total [baseline] (10.782 s) : 0, 10782475
Agent [candidate] (1.189 s) : 0, 1188859
Total [candidate] (10.833 s) : 0, 10832578
section profiling
Agent [baseline] (1.242 s) : 0, 1242175
Total [baseline] (10.58 s) : 0, 10579519
Agent [candidate] (1.242 s) : 0, 1242276
Total [candidate] (10.63 s) : 0, 10630035
gantt
title petclinic - break down per module: candidate=1.38.0-SNAPSHOT~430807e1d2, baseline=1.38.0-SNAPSHOT~1d41c00244
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (671.983 ms) : 0, 671983
BytebuddyAgent [candidate] (668.668 ms) : 0, 668668
GlobalTracer [baseline] (306.127 ms) : 0, 306127
GlobalTracer [candidate] (305.363 ms) : 0, 305363
AppSec [baseline] (50.679 ms) : 0, 50679
AppSec [candidate] (49.979 ms) : 0, 49979
Remote Config [baseline] (684.172 µs) : 0, 684
Remote Config [candidate] (713.419 µs) : 0, 713
Telemetry [baseline] (7.393 ms) : 0, 7393
Telemetry [candidate] (7.603 ms) : 0, 7603
section appsec
BytebuddyAgent [baseline] (681.615 ms) : 0, 681615
BytebuddyAgent [candidate] (680.2 ms) : 0, 680200
GlobalTracer [baseline] (299.563 ms) : 0, 299563
GlobalTracer [candidate] (299.146 ms) : 0, 299146
AppSec [baseline] (155.612 ms) : 0, 155612
AppSec [candidate] (154.52 ms) : 0, 154520
Remote Config [baseline] (606.257 µs) : 0, 606
Remote Config [candidate] (627.809 µs) : 0, 628
Telemetry [baseline] (7.281 ms) : 0, 7281
Telemetry [candidate] (8.912 ms) : 0, 8912
IAST [baseline] (20.891 ms) : 0, 20891
IAST [candidate] (22.41 ms) : 0, 22410
section iast
BytebuddyAgent [baseline] (782.802 ms) : 0, 782802
BytebuddyAgent [candidate] (794.576 ms) : 0, 794576
GlobalTracer [baseline] (295.207 ms) : 0, 295207
GlobalTracer [candidate] (297.318 ms) : 0, 297318
AppSec [baseline] (48.044 ms) : 0, 48044
AppSec [candidate] (48.925 ms) : 0, 48925
Remote Config [baseline] (589.101 µs) : 0, 589
Remote Config [candidate] (594.895 µs) : 0, 595
Telemetry [baseline] (7.046 ms) : 0, 7046
Telemetry [candidate] (7.947 ms) : 0, 7947
IAST [baseline] (27.518 ms) : 0, 27518
IAST [candidate] (25.82 ms) : 0, 25820
section profiling
BytebuddyAgent [baseline] (663.634 ms) : 0, 663634
BytebuddyAgent [candidate] (663.548 ms) : 0, 663548
GlobalTracer [baseline] (387.429 ms) : 0, 387429
GlobalTracer [candidate] (387.813 ms) : 0, 387813
AppSec [baseline] (51.241 ms) : 0, 51241
AppSec [candidate] (51.773 ms) : 0, 51773
Remote Config [baseline] (695.54 µs) : 0, 696
Remote Config [candidate] (651.683 µs) : 0, 652
Telemetry [baseline] (7.255 ms) : 0, 7255
Telemetry [candidate] (7.325 ms) : 0, 7325
ProfilingAgent [baseline] (95.128 ms) : 0, 95128
ProfilingAgent [candidate] (94.292 ms) : 0, 94292
Profiling [baseline] (95.153 ms) : 0, 95153
Profiling [candidate] (94.317 ms) : 0, 94317
LoadParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 12 metrics, 16 unstable metrics. Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.38.0-SNAPSHOT~430807e1d2, baseline=1.38.0-SNAPSHOT~1d41c00244
dateFormat X
axisFormat %s
section baseline
no_agent (1.328 ms) : 1309, 1347
. : milestone, 1328,
appsec (1.712 ms) : 1687, 1737
. : milestone, 1712,
appsec_no_iast (1.727 ms) : 1703, 1750
. : milestone, 1727,
iast (1.468 ms) : 1446, 1490
. : milestone, 1468,
profiling (1.484 ms) : 1459, 1509
. : milestone, 1484,
tracing (1.465 ms) : 1441, 1490
. : milestone, 1465,
section candidate
no_agent (1.34 ms) : 1322, 1359
. : milestone, 1340,
appsec (1.727 ms) : 1702, 1752
. : milestone, 1727,
appsec_no_iast (1.715 ms) : 1691, 1739
. : milestone, 1715,
iast (1.475 ms) : 1452, 1497
. : milestone, 1475,
profiling (1.482 ms) : 1457, 1506
. : milestone, 1482,
tracing (1.473 ms) : 1448, 1497
. : milestone, 1473,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.38.0-SNAPSHOT~430807e1d2, baseline=1.38.0-SNAPSHOT~1d41c00244
dateFormat X
axisFormat %s
section baseline
no_agent (369.777 µs) : 350, 389
. : milestone, 370,
iast (489.381 µs) : 468, 511
. : milestone, 489,
iast_FULL (552.492 µs) : 531, 574
. : milestone, 552,
iast_GLOBAL (503.289 µs) : 482, 524
. : milestone, 503,
iast_HARDCODED_SECRET_DISABLED (485.259 µs) : 464, 507
. : milestone, 485,
iast_INACTIVE (461.07 µs) : 439, 483
. : milestone, 461,
iast_TELEMETRY_OFF (474.891 µs) : 454, 496
. : milestone, 475,
tracing (443.449 µs) : 423, 464
. : milestone, 443,
section candidate
no_agent (365.81 µs) : 346, 386
. : milestone, 366,
iast (490.218 µs) : 468, 512
. : milestone, 490,
iast_FULL (553.157 µs) : 531, 575
. : milestone, 553,
iast_GLOBAL (511.934 µs) : 490, 534
. : milestone, 512,
iast_HARDCODED_SECRET_DISABLED (484.21 µs) : 463, 505
. : milestone, 484,
iast_INACTIVE (453.36 µs) : 432, 475
. : milestone, 453,
iast_TELEMETRY_OFF (470.338 µs) : 449, 492
. : milestone, 470,
tracing (446.782 µs) : 426, 467
. : milestone, 447,
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.38.0-SNAPSHOT~430807e1d2, baseline=1.38.0-SNAPSHOT~1d41c00244
dateFormat X
axisFormat %s
section baseline
no_agent (1.458 ms) : 1447, 1470
. : milestone, 1458,
appsec (2.226 ms) : 2191, 2261
. : milestone, 2226,
iast (1.985 ms) : 1943, 2028
. : milestone, 1985,
iast_GLOBAL (2.024 ms) : 1981, 2067
. : milestone, 2024,
profiling (1.863 ms) : 1829, 1897
. : milestone, 1863,
tracing (1.838 ms) : 1806, 1870
. : milestone, 1838,
section candidate
no_agent (1.466 ms) : 1455, 1478
. : milestone, 1466,
appsec (2.234 ms) : 2199, 2269
. : milestone, 2234,
iast (1.98 ms) : 1938, 2022
. : milestone, 1980,
iast_GLOBAL (2.011 ms) : 1969, 2054
. : milestone, 2011,
profiling (1.868 ms) : 1834, 1901
. : milestone, 1868,
tracing (1.853 ms) : 1820, 1886
. : milestone, 1853,
Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.38.0-SNAPSHOT~430807e1d2, baseline=1.38.0-SNAPSHOT~1d41c00244
dateFormat X
axisFormat %s
section baseline
no_agent (15.008 s) : 15008000, 15008000
. : milestone, 15008000,
appsec (15.357 s) : 15357000, 15357000
. : milestone, 15357000,
iast (18.666 s) : 18666000, 18666000
. : milestone, 18666000,
iast_GLOBAL (18.062 s) : 18062000, 18062000
. : milestone, 18062000,
profiling (15.629 s) : 15629000, 15629000
. : milestone, 15629000,
tracing (14.774 s) : 14774000, 14774000
. : milestone, 14774000,
section candidate
no_agent (15.116 s) : 15116000, 15116000
. : milestone, 15116000,
appsec (14.926 s) : 14926000, 14926000
. : milestone, 14926000,
iast (18.677 s) : 18677000, 18677000
. : milestone, 18677000,
iast_GLOBAL (18.032 s) : 18032000, 18032000
. : milestone, 18032000,
profiling (15.202 s) : 15202000, 15202000
. : milestone, 15202000,
tracing (15.011 s) : 15011000, 15011000
. : milestone, 15011000,
|
…d on but the jvm is not started with a expected java command pattern
@@ -204,6 +204,14 @@ public static void start(final Instrumentation inst, final URL agentJarURL, Stri | |||
|
|||
boolean dataJobsEnabled = isFeatureEnabled(AgentFeature.DATA_JOBS); | |||
if (dataJobsEnabled) { | |||
if (!isDataJobsSupported()) { |
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.
We need to make sure that that we update this to work with the new bootstrap telemetry reporting, too.
If this goes in before my PR, I can make the necessary changes.
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.
hi @dougqh, feel free making the necessary changes to include your bootstrap telemetry reporting. Thanks!
return true; | ||
} | ||
|
||
return javaCommand.matches(dataJobsCommandPattern); |
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.
Normally, I'd want to see the regex compiled, but since this is only called once it is fine.
What Does This Do
Add parameter
dd.data.jobs.command.pattern
to only inject the tracer on specific command pattern for Data JobsIn the context of Data Jobs Monitoring, change the Java tracer to become more selective about which Java process to instrument when Data Jobs is enabled and a Java command regex pattern is specified. In runtime environment where we are not sure the command pattern to use, the java tracer should just behave as before by continuing the Agent start.
Motivation
With single step instrumentation, Java tracer is injected for all Java processes, this is causing some initial system overhead as Java tracer starts in those JVMs. In resource limited environment, this can cause the host to be replaced due to high system load. For Data Jobs Monitoring, the Java tracer only cares about Spark process running the driver and executors, this newly added command pattern allows us to exit the Agent early if we don't think the process is Spark related and saving the overhead of increased System load.
Additional Notes
DD_DATA_JOBS_COMMAND_PATTERN
.DD_DATA_JOBS_COMMAND_PATTERN
only takes effects ifDD_DATA_JOBS_ENABLED
is set totrue
.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]