-
Notifications
You must be signed in to change notification settings - Fork 312
Improve agent to avoid loading global config on main thread #9190
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
Open
PerfectSlayer
wants to merge
7
commits into
master
Choose a base branch
from
bbujon/environment-step2
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+139
−126
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This was referenced Jul 17, 2025
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 49 metrics, 10 unstable metrics. Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.52.0-SNAPSHOT~73a984f1db, baseline=1.52.0-SNAPSHOT~887ea397cc
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.037 s) : 0, 1036728
Total [baseline] (8.569 s) : 0, 8568990
Agent [candidate] (1.039 s) : 0, 1039112
Total [candidate] (8.582 s) : 0, 8582442
section iast
Agent [baseline] (1.173 s) : 0, 1173055
Total [baseline] (9.228 s) : 0, 9228156
Agent [candidate] (1.178 s) : 0, 1178022
Total [candidate] (9.261 s) : 0, 9260912
gantt
title insecure-bank - break down per module: candidate=1.52.0-SNAPSHOT~73a984f1db, baseline=1.52.0-SNAPSHOT~887ea397cc
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.42 ms) : 0, 1420
crashtracking [candidate] (1.433 ms) : 0, 1433
BytebuddyAgent [baseline] (729.042 ms) : 0, 729042
BytebuddyAgent [candidate] (730.364 ms) : 0, 730364
GlobalTracer [baseline] (240.482 ms) : 0, 240482
GlobalTracer [candidate] (241.212 ms) : 0, 241212
AppSec [baseline] (30.098 ms) : 0, 30098
AppSec [candidate] (30.335 ms) : 0, 30335
Debugger [baseline] (5.981 ms) : 0, 5981
Debugger [candidate] (5.992 ms) : 0, 5992
Remote Config [baseline] (641.048 µs) : 0, 641
Remote Config [candidate] (657.35 µs) : 0, 657
Telemetry [baseline] (8.18 ms) : 0, 8180
Telemetry [candidate] (8.183 ms) : 0, 8183
section iast
crashtracking [baseline] (1.421 ms) : 0, 1421
crashtracking [candidate] (1.432 ms) : 0, 1432
BytebuddyAgent [baseline] (847.173 ms) : 0, 847173
BytebuddyAgent [candidate] (851.992 ms) : 0, 851992
GlobalTracer [baseline] (231.07 ms) : 0, 231070
GlobalTracer [candidate] (231.219 ms) : 0, 231219
IAST [baseline] (26.725 ms) : 0, 26725
IAST [candidate] (30.117 ms) : 0, 30117
AppSec [baseline] (30.761 ms) : 0, 30761
AppSec [candidate] (28.047 ms) : 0, 28047
Debugger [baseline] (6.518 ms) : 0, 6518
Debugger [candidate] (5.796 ms) : 0, 5796
Remote Config [baseline] (580.262 µs) : 0, 580
Remote Config [candidate] (590.051 µs) : 0, 590
Telemetry [baseline] (7.885 ms) : 0, 7885
Telemetry [candidate] (7.898 ms) : 0, 7898
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.52.0-SNAPSHOT~73a984f1db, baseline=1.52.0-SNAPSHOT~887ea397cc
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.049 s) : 0, 1049181
Total [baseline] (10.708 s) : 0, 10708160
Agent [candidate] (1.044 s) : 0, 1043994
Total [candidate] (10.686 s) : 0, 10685689
section appsec
Agent [baseline] (1.217 s) : 0, 1217394
Total [baseline] (10.785 s) : 0, 10784918
Agent [candidate] (1.224 s) : 0, 1223971
Total [candidate] (10.746 s) : 0, 10745930
section iast
Agent [baseline] (1.185 s) : 0, 1185259
Total [baseline] (10.848 s) : 0, 10847513
Agent [candidate] (1.17 s) : 0, 1169779
Total [candidate] (10.836 s) : 0, 10835510
section profiling
Agent [baseline] (1.184 s) : 0, 1183524
Total [baseline] (10.889 s) : 0, 10889497
Agent [candidate] (1.179 s) : 0, 1178908
Total [candidate] (10.804 s) : 0, 10803760
gantt
title petclinic - break down per module: candidate=1.52.0-SNAPSHOT~73a984f1db, baseline=1.52.0-SNAPSHOT~887ea397cc
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.429 ms) : 0, 1429
crashtracking [candidate] (1.433 ms) : 0, 1433
BytebuddyAgent [baseline] (737.414 ms) : 0, 737414
BytebuddyAgent [candidate] (733.859 ms) : 0, 733859
GlobalTracer [baseline] (243.299 ms) : 0, 243299
GlobalTracer [candidate] (242.001 ms) : 0, 242001
AppSec [baseline] (30.894 ms) : 0, 30894
AppSec [candidate] (30.633 ms) : 0, 30633
Debugger [baseline] (6.052 ms) : 0, 6052
Debugger [candidate] (6.051 ms) : 0, 6051
Remote Config [baseline] (658.315 µs) : 0, 658
Remote Config [candidate] (652.305 µs) : 0, 652
Telemetry [baseline] (8.382 ms) : 0, 8382
Telemetry [candidate] (8.252 ms) : 0, 8252
section appsec
crashtracking [baseline] (1.429 ms) : 0, 1429
crashtracking [candidate] (1.43 ms) : 0, 1430
BytebuddyAgent [baseline] (751.269 ms) : 0, 751269
BytebuddyAgent [candidate] (756.007 ms) : 0, 756007
GlobalTracer [baseline] (234.554 ms) : 0, 234554
GlobalTracer [candidate] (235.417 ms) : 0, 235417
IAST [baseline] (23.411 ms) : 0, 23411
IAST [candidate] (23.812 ms) : 0, 23812
AppSec [baseline] (167.396 ms) : 0, 167396
AppSec [candidate] (168.468 ms) : 0, 168468
Debugger [baseline] (9.353 ms) : 0, 9353
Debugger [candidate] (7.98 ms) : 0, 7980
Remote Config [baseline] (604.995 µs) : 0, 605
Remote Config [candidate] (622.184 µs) : 0, 622
Telemetry [baseline] (8.144 ms) : 0, 8144
Telemetry [candidate] (8.863 ms) : 0, 8863
section iast
crashtracking [baseline] (1.449 ms) : 0, 1449
crashtracking [candidate] (1.434 ms) : 0, 1434
BytebuddyAgent [baseline] (857.647 ms) : 0, 857647
BytebuddyAgent [candidate] (845.181 ms) : 0, 845181
GlobalTracer [baseline] (231.854 ms) : 0, 231854
GlobalTracer [candidate] (230.259 ms) : 0, 230259
IAST [baseline] (31.061 ms) : 0, 31061
IAST [candidate] (28.985 ms) : 0, 28985
AppSec [baseline] (26.852 ms) : 0, 26852
AppSec [candidate] (27.969 ms) : 0, 27969
Debugger [baseline] (6.68 ms) : 0, 6680
Debugger [candidate] (6.614 ms) : 0, 6614
Remote Config [baseline] (598.43 µs) : 0, 598
Remote Config [candidate] (571.119 µs) : 0, 571
Telemetry [baseline] (8.037 ms) : 0, 8037
Telemetry [candidate] (7.895 ms) : 0, 7895
section profiling
crashtracking [baseline] (1.404 ms) : 0, 1404
crashtracking [candidate] (1.394 ms) : 0, 1394
BytebuddyAgent [baseline] (758.266 ms) : 0, 758266
BytebuddyAgent [candidate] (756.362 ms) : 0, 756362
GlobalTracer [baseline] (221.205 ms) : 0, 221205
GlobalTracer [candidate] (219.061 ms) : 0, 219061
AppSec [baseline] (30.508 ms) : 0, 30508
AppSec [candidate] (30.126 ms) : 0, 30126
Debugger [baseline] (6.296 ms) : 0, 6296
Debugger [candidate] (6.231 ms) : 0, 6231
Remote Config [baseline] (686.205 µs) : 0, 686
Remote Config [candidate] (657.734 µs) : 0, 658
Telemetry [baseline] (12.357 ms) : 0, 12357
Telemetry [candidate] (11.1 ms) : 0, 11100
ProfilingAgent [baseline] (104.178 ms) : 0, 104178
ProfilingAgent [candidate] (105.67 ms) : 0, 105670
Profiling [baseline] (104.2 ms) : 0, 104200
Profiling [candidate] (105.693 ms) : 0, 105693
LoadParameters
See matching parameters
SummaryFound 3 performance improvements and 1 performance regressions! Performance is the same for 8 metrics, 12 unstable metrics.
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.52.0-SNAPSHOT~73a984f1db, baseline=1.52.0-SNAPSHOT~887ea397cc
dateFormat X
axisFormat %s
section baseline
no_agent (36.659 ms) : 36362, 36955
. : milestone, 36659,
appsec (47.29 ms) : 46872, 47708
. : milestone, 47290,
code_origins (48.081 ms) : 47660, 48502
. : milestone, 48081,
iast (46.227 ms) : 45826, 46628
. : milestone, 46227,
profiling (47.995 ms) : 47525, 48464
. : milestone, 47995,
tracing (44.55 ms) : 44164, 44935
. : milestone, 44550,
section candidate
no_agent (36.43 ms) : 36143, 36717
. : milestone, 36430,
appsec (48.152 ms) : 47719, 48585
. : milestone, 48152,
code_origins (44.946 ms) : 44564, 45329
. : milestone, 44946,
iast (44.803 ms) : 44422, 45184
. : milestone, 44803,
profiling (50.137 ms) : 49625, 50649
. : milestone, 50137,
tracing (44.876 ms) : 44481, 45272
. : milestone, 44876,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.52.0-SNAPSHOT~73a984f1db, baseline=1.52.0-SNAPSHOT~887ea397cc
dateFormat X
axisFormat %s
section baseline
no_agent (4.541 ms) : 4489, 4593
. : milestone, 4541,
iast (9.645 ms) : 9484, 9805
. : milestone, 9645,
iast_FULL (14.305 ms) : 14023, 14588
. : milestone, 14305,
iast_GLOBAL (9.663 ms) : 9499, 9826
. : milestone, 9663,
profiling (9.308 ms) : 9144, 9472
. : milestone, 9308,
tracing (7.547 ms) : 7440, 7653
. : milestone, 7547,
section candidate
no_agent (4.511 ms) : 4454, 4567
. : milestone, 4511,
iast (9.576 ms) : 9415, 9736
. : milestone, 9576,
iast_FULL (13.595 ms) : 13326, 13863
. : milestone, 13595,
iast_GLOBAL (10.035 ms) : 9849, 10220
. : milestone, 10035,
profiling (8.98 ms) : 8830, 9129
. : milestone, 8980,
tracing (7.604 ms) : 7488, 7720
. : milestone, 7604,
DacapoParameters
See matching parameters
SummaryFound 1 performance improvements and 0 performance regressions! Performance is the same for 11 metrics, 0 unstable metrics.
Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.52.0-SNAPSHOT~73a984f1db, baseline=1.52.0-SNAPSHOT~887ea397cc
dateFormat X
axisFormat %s
section baseline
no_agent (15.534 s) : 15534000, 15534000
. : milestone, 15534000,
appsec (14.684 s) : 14684000, 14684000
. : milestone, 14684000,
iast (18.951 s) : 18951000, 18951000
. : milestone, 18951000,
iast_GLOBAL (17.681 s) : 17681000, 17681000
. : milestone, 17681000,
profiling (15.468 s) : 15468000, 15468000
. : milestone, 15468000,
tracing (14.784 s) : 14784000, 14784000
. : milestone, 14784000,
section candidate
no_agent (14.986 s) : 14986000, 14986000
. : milestone, 14986000,
appsec (15.086 s) : 15086000, 15086000
. : milestone, 15086000,
iast (18.307 s) : 18307000, 18307000
. : milestone, 18307000,
iast_GLOBAL (17.859 s) : 17859000, 17859000
. : milestone, 17859000,
profiling (15.378 s) : 15378000, 15378000
. : milestone, 15378000,
tracing (14.843 s) : 14843000, 14843000
. : milestone, 14843000,
Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.52.0-SNAPSHOT~73a984f1db, baseline=1.52.0-SNAPSHOT~887ea397cc
dateFormat X
axisFormat %s
section baseline
no_agent (1.468 ms) : 1456, 1479
. : milestone, 1468,
appsec (3.569 ms) : 3357, 3781
. : milestone, 3569,
iast (2.184 ms) : 2122, 2246
. : milestone, 2184,
iast_GLOBAL (2.225 ms) : 2163, 2288
. : milestone, 2225,
profiling (2.032 ms) : 1982, 2082
. : milestone, 2032,
tracing (2.009 ms) : 1961, 2057
. : milestone, 2009,
section candidate
no_agent (1.47 ms) : 1459, 1482
. : milestone, 1470,
appsec (2.448 ms) : 2395, 2501
. : milestone, 2448,
iast (2.191 ms) : 2129, 2253
. : milestone, 2191,
iast_GLOBAL (2.217 ms) : 2155, 2280
. : milestone, 2217,
profiling (2.058 ms) : 2006, 2110
. : milestone, 2058,
tracing (2.009 ms) : 1961, 2057
. : milestone, 2009,
|
78ad76f
to
9d287cb
Compare
3cca925
to
8647cfd
Compare
8647cfd
to
e085472
Compare
AlexeyKuznetsov-DD
requested changes
Jul 18, 2025
dd-java-agent/src/main/java/datadog/trace/bootstrap/AgentBootstrap.java
Outdated
Show resolved
Hide resolved
dd-java-agent/src/main/java6/datadog/trace/bootstrap/AgentPreCheck.java
Outdated
Show resolved
Hide resolved
AlexeyKuznetsov-DD
approved these changes
Jul 18, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What Does This Do
This PR improves the agent to
Config
class on main thread at start upstart()
initialization failureMotivation
This should speed up the build by not inflating the whole
Config
at startup.This should also improve stability by catching possible rare exceptions.
Additional Notes
Environment component related stacked PRs:
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: LANGPLAT-458