-
Notifications
You must be signed in to change notification settings - Fork 312
Migrate AgentBootStrap to environment component #9072
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
abadc3a
to
7f998a4
Compare
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 45 metrics, 8 unstable metrics. Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.51.0-SNAPSHOT~2247e2e201, baseline=1.51.0-SNAPSHOT~5353d512d0
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.014 s) : 0, 1014308
Total [baseline] (8.604 s) : 0, 8603929
Agent [candidate] (995.654 ms) : 0, 995654
Total [candidate] (8.54 s) : 0, 8539690
section iast
Agent [baseline] (1.132 s) : 0, 1132342
Total [baseline] (9.246 s) : 0, 9246026
Agent [candidate] (1.14 s) : 0, 1140084
Total [candidate] (9.267 s) : 0, 9266640
gantt
title insecure-bank - break down per module: candidate=1.51.0-SNAPSHOT~2247e2e201, baseline=1.51.0-SNAPSHOT~5353d512d0
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (702.537 ms) : 0, 702537
BytebuddyAgent [candidate] (687.83 ms) : 0, 687830
GlobalTracer [baseline] (244.769 ms) : 0, 244769
GlobalTracer [candidate] (242.085 ms) : 0, 242085
AppSec [baseline] (30.74 ms) : 0, 30740
AppSec [candidate] (30.116 ms) : 0, 30116
Debugger [baseline] (6.108 ms) : 0, 6108
Debugger [candidate] (6.046 ms) : 0, 6046
Remote Config [baseline] (695.426 µs) : 0, 695
Remote Config [candidate] (697.116 µs) : 0, 697
Telemetry [baseline] (8.308 ms) : 0, 8308
Telemetry [candidate] (8.242 ms) : 0, 8242
section iast
BytebuddyAgent [baseline] (808.373 ms) : 0, 808373
BytebuddyAgent [candidate] (814.33 ms) : 0, 814330
GlobalTracer [baseline] (233.084 ms) : 0, 233084
GlobalTracer [candidate] (234.305 ms) : 0, 234305
IAST [baseline] (29.78 ms) : 0, 29780
IAST [candidate] (27.105 ms) : 0, 27105
AppSec [baseline] (25.984 ms) : 0, 25984
AppSec [candidate] (28.122 ms) : 0, 28122
Debugger [baseline] (5.843 ms) : 0, 5843
Debugger [candidate] (6.711 ms) : 0, 6711
Remote Config [baseline] (572.853 µs) : 0, 573
Remote Config [candidate] (582.911 µs) : 0, 583
Telemetry [baseline] (7.99 ms) : 0, 7990
Telemetry [candidate] (8.006 ms) : 0, 8006
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.51.0-SNAPSHOT~2247e2e201, baseline=1.51.0-SNAPSHOT~5353d512d0
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (997.474 ms) : 0, 997474
Total [baseline] (10.622 s) : 0, 10622164
Agent [candidate] (998.537 ms) : 0, 998537
Total [candidate] (10.61 s) : 0, 10610228
section appsec
Agent [baseline] (1.175 s) : 0, 1174886
Total [baseline] (10.775 s) : 0, 10774879
Agent [candidate] (1.184 s) : 0, 1183585
Total [candidate] (10.833 s) : 0, 10833112
section iast
Agent [baseline] (1.151 s) : 0, 1151275
Total [baseline] (10.956 s) : 0, 10955825
Agent [candidate] (1.139 s) : 0, 1139389
Total [candidate] (10.842 s) : 0, 10842044
section profiling
Agent [baseline] (1.25 s) : 0, 1250165
Total [baseline] (10.898 s) : 0, 10897876
Agent [candidate] (1.262 s) : 0, 1262059
Total [candidate] (11.01 s) : 0, 11009619
gantt
title petclinic - break down per module: candidate=1.51.0-SNAPSHOT~2247e2e201, baseline=1.51.0-SNAPSHOT~5353d512d0
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (689.101 ms) : 0, 689101
BytebuddyAgent [candidate] (689.581 ms) : 0, 689581
GlobalTracer [baseline] (242.492 ms) : 0, 242492
GlobalTracer [candidate] (242.889 ms) : 0, 242889
AppSec [baseline] (30.168 ms) : 0, 30168
AppSec [candidate] (30.39 ms) : 0, 30390
Debugger [baseline] (6.022 ms) : 0, 6022
Debugger [candidate] (6.064 ms) : 0, 6064
Remote Config [baseline] (667.202 µs) : 0, 667
Remote Config [candidate] (681.416 µs) : 0, 681
Telemetry [baseline] (8.175 ms) : 0, 8175
Telemetry [candidate] (8.241 ms) : 0, 8241
section appsec
BytebuddyAgent [baseline] (710.672 ms) : 0, 710672
BytebuddyAgent [candidate] (717.603 ms) : 0, 717603
GlobalTracer [baseline] (235.967 ms) : 0, 235967
GlobalTracer [candidate] (236.55 ms) : 0, 236550
IAST [baseline] (22.053 ms) : 0, 22053
IAST [candidate] (22.184 ms) : 0, 22184
AppSec [baseline] (170.901 ms) : 0, 170901
AppSec [candidate] (171.71 ms) : 0, 171710
Debugger [baseline] (5.791 ms) : 0, 5791
Debugger [candidate] (5.794 ms) : 0, 5794
Remote Config [baseline] (610.732 µs) : 0, 611
Remote Config [candidate] (603.518 µs) : 0, 604
Telemetry [baseline] (8.124 ms) : 0, 8124
Telemetry [candidate] (8.162 ms) : 0, 8162
section iast
BytebuddyAgent [baseline] (822.33 ms) : 0, 822330
BytebuddyAgent [candidate] (813.687 ms) : 0, 813687
GlobalTracer [baseline] (236.573 ms) : 0, 236573
GlobalTracer [candidate] (234.35 ms) : 0, 234350
IAST [baseline] (28.519 ms) : 0, 28519
IAST [candidate] (25.817 ms) : 0, 25817
AppSec [baseline] (28.19 ms) : 0, 28190
AppSec [candidate] (30.419 ms) : 0, 30419
Debugger [baseline] (5.91 ms) : 0, 5910
Debugger [candidate] (5.784 ms) : 0, 5784
Remote Config [baseline] (585.635 µs) : 0, 586
Remote Config [candidate] (560.818 µs) : 0, 561
Telemetry [baseline] (8.111 ms) : 0, 8111
Telemetry [candidate] (7.93 ms) : 0, 7930
section profiling
BytebuddyAgent [baseline] (682.252 ms) : 0, 682252
BytebuddyAgent [candidate] (688.252 ms) : 0, 688252
GlobalTracer [baseline] (363.155 ms) : 0, 363155
GlobalTracer [candidate] (365.302 ms) : 0, 365302
AppSec [baseline] (32.392 ms) : 0, 32392
AppSec [candidate] (33.761 ms) : 0, 33761
Debugger [baseline] (10.68 ms) : 0, 10680
Debugger [candidate] (11.383 ms) : 0, 11383
Remote Config [baseline] (656.226 µs) : 0, 656
Remote Config [candidate] (679.401 µs) : 0, 679
Telemetry [baseline] (9.393 ms) : 0, 9393
Telemetry [candidate] (8.166 ms) : 0, 8166
ProfilingAgent [baseline] (102.77 ms) : 0, 102770
ProfilingAgent [candidate] (105.269 ms) : 0, 105269
Profiling [baseline] (102.795 ms) : 0, 102795
Profiling [candidate] (105.294 ms) : 0, 105294
LoadParameters
See matching parameters
SummaryFound 1 performance improvements and 1 performance regressions! Performance is the same for 10 metrics, 12 unstable metrics.
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.51.0-SNAPSHOT~2247e2e201, baseline=1.51.0-SNAPSHOT~5353d512d0
dateFormat X
axisFormat %s
section baseline
no_agent (35.114 ms) : 34839, 35389
. : milestone, 35114,
appsec (47.08 ms) : 46648, 47513
. : milestone, 47080,
code_origins (47.574 ms) : 47164, 47985
. : milestone, 47574,
iast (43.885 ms) : 43499, 44271
. : milestone, 43885,
profiling (48.245 ms) : 47780, 48710
. : milestone, 48245,
tracing (44.448 ms) : 44075, 44822
. : milestone, 44448,
section candidate
no_agent (34.853 ms) : 34583, 35123
. : milestone, 34853,
appsec (46.507 ms) : 46093, 46921
. : milestone, 46507,
code_origins (45.287 ms) : 44911, 45662
. : milestone, 45287,
iast (44.895 ms) : 44507, 45283
. : milestone, 44895,
profiling (47.783 ms) : 47327, 48239
. : milestone, 47783,
tracing (44.048 ms) : 43663, 44433
. : milestone, 44048,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.51.0-SNAPSHOT~2247e2e201, baseline=1.51.0-SNAPSHOT~5353d512d0
dateFormat X
axisFormat %s
section baseline
no_agent (4.387 ms) : 4337, 4438
. : milestone, 4387,
iast (9.015 ms) : 8869, 9161
. : milestone, 9015,
iast_FULL (14.058 ms) : 13778, 14338
. : milestone, 14058,
iast_GLOBAL (10.019 ms) : 9844, 10194
. : milestone, 10019,
profiling (8.818 ms) : 8671, 8965
. : milestone, 8818,
tracing (7.727 ms) : 7609, 7845
. : milestone, 7727,
section candidate
no_agent (4.485 ms) : 4434, 4536
. : milestone, 4485,
iast (9.102 ms) : 8955, 9248
. : milestone, 9102,
iast_FULL (13.915 ms) : 13642, 14189
. : milestone, 13915,
iast_GLOBAL (10.428 ms) : 10246, 10611
. : milestone, 10428,
profiling (8.74 ms) : 8600, 8880
. : milestone, 8740,
tracing (7.542 ms) : 7435, 7649
. : milestone, 7542,
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.51.0-SNAPSHOT~2247e2e201, baseline=1.51.0-SNAPSHOT~5353d512d0
dateFormat X
axisFormat %s
section baseline
no_agent (1.473 ms) : 1461, 1484
. : milestone, 1473,
appsec (2.415 ms) : 2364, 2465
. : milestone, 2415,
iast (2.198 ms) : 2136, 2261
. : milestone, 2198,
iast_GLOBAL (2.242 ms) : 2179, 2305
. : milestone, 2242,
profiling (2.041 ms) : 1990, 2093
. : milestone, 2041,
tracing (2.007 ms) : 1958, 2056
. : milestone, 2007,
section candidate
no_agent (1.476 ms) : 1464, 1487
. : milestone, 1476,
appsec (2.406 ms) : 2356, 2456
. : milestone, 2406,
iast (2.195 ms) : 2132, 2257
. : milestone, 2195,
iast_GLOBAL (2.235 ms) : 2172, 2297
. : milestone, 2235,
profiling (2.043 ms) : 1992, 2094
. : milestone, 2043,
tracing (2.013 ms) : 1964, 2062
. : milestone, 2013,
Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.51.0-SNAPSHOT~2247e2e201, baseline=1.51.0-SNAPSHOT~5353d512d0
dateFormat X
axisFormat %s
section baseline
no_agent (15.346 s) : 15346000, 15346000
. : milestone, 15346000,
appsec (14.836 s) : 14836000, 14836000
. : milestone, 14836000,
iast (18.363 s) : 18363000, 18363000
. : milestone, 18363000,
iast_GLOBAL (18.103 s) : 18103000, 18103000
. : milestone, 18103000,
profiling (15.105 s) : 15105000, 15105000
. : milestone, 15105000,
tracing (14.632 s) : 14632000, 14632000
. : milestone, 14632000,
section candidate
no_agent (15.457 s) : 15457000, 15457000
. : milestone, 15457000,
appsec (14.66 s) : 14660000, 14660000
. : milestone, 14660000,
iast (18.661 s) : 18661000, 18661000
. : milestone, 18661000,
iast_GLOBAL (17.672 s) : 17672000, 17672000
. : milestone, 17672000,
profiling (15.144 s) : 15144000, 15144000
. : milestone, 15144000,
tracing (14.618 s) : 14618000, 14618000
. : milestone, 14618000,
|
7f998a4
to
874c7b1
Compare
874c7b1
to
2247e2e
Compare
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
*/ | ||
public static final String[] BOOTSTRAP_PACKAGE_PREFIXES = { | ||
"datadog.slf4j", | ||
"datadog.context", |
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.
a curiosity: are those in probability of match order? Otherwise we might tend to have them just ordered alphabetically. (It's not necessary to change)
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 usually iterate over the array and use startWith()
with the elements.
So order will matter yes. But is it currently the best order? I'm unsure.
@mcculls might be able to provide more context 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.
maybe this can be refactored as a trie (unsure what we have today handles package names) ?
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.
I added the tries idea to the feedback collection stored in the JIRA card 👍
What Does This Do
This PR migrates the agent bootstrap check to use the new environment component.
Motivation
The goal is to have better and safer check, especially around agent detection.
Additional Notes
This PR is the second of many stacked PRs to come.
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]