Commit d6e2c2e
authored
Defer remote components to avoid OkHttp class-loading side-effects (#8131)
* Additional logging to help triage custom log-manager / jmx-builder test failures.
* Move SharedCommunicationObjects creation to InstallDatadogTracerCallback constructor
* Add ability to pause remote components until SharedCommunicationObjects is ready
* Delay starting trace-writer and data-stream-monitoring until remote I/O is allowed
* Delay starting logs-intake backend until remote I/O is allowed
* Install tracer and logs-intake as soon as necessary, but defer any remote components when use of OkHttp should be delayed
* Remove exemption where we didn't defer if the custom logging manager
or JMX builder was on the system classpath (because the main thread
would find it there if OkHttp triggered initialization of JUL.).
We now make OkHttp calls from our own background threads, which are
isolated from the system classloader, not the main thread - so this
exemption no longer makes sense.
* Adjust minimumBranchCoverage to account for new double-checked lock in SharedCommunicationObjects1 parent 5b1d1e4 commit d6e2c2e
File tree
10 files changed
+160
-138
lines changed- communication
- src/main/java/datadog/communication/ddagent
- dd-java-agent
- agent-bootstrap/src/main/java/datadog/trace/bootstrap
- agent-logs-intake/src/main/java/datadog/trace/logging/intake
- src/test
- groovy/datadog/trace/agent
- java/jvmbootstraptest
- dd-trace-core/src/main/java/datadog/trace/core
10 files changed
+160
-138
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| |||
Lines changed: 48 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
14 | 16 | | |
15 | 17 | | |
16 | 18 | | |
| |||
21 | 23 | | |
22 | 24 | | |
23 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
24 | 29 | | |
25 | 30 | | |
26 | 31 | | |
27 | 32 | | |
28 | 33 | | |
29 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
30 | 43 | | |
31 | 44 | | |
32 | 45 | | |
| |||
46 | 59 | | |
47 | 60 | | |
48 | 61 | | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
49 | 88 | | |
50 | 89 | | |
51 | 90 | | |
| |||
100 | 139 | | |
101 | 140 | | |
102 | 141 | | |
103 | | - | |
104 | | - | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
105 | 145 | | |
106 | | - | |
107 | | - | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
108 | 152 | | |
109 | 153 | | |
110 | 154 | | |
| |||
Lines changed: 41 additions & 35 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
14 | 13 | | |
15 | 14 | | |
16 | 15 | | |
| |||
348 | 347 | | |
349 | 348 | | |
350 | 349 | | |
351 | | - | |
| 350 | + | |
352 | 351 | | |
353 | 352 | | |
354 | 353 | | |
| |||
497 | 496 | | |
498 | 497 | | |
499 | 498 | | |
500 | | - | |
501 | 499 | | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
502 | 503 | | |
503 | 504 | | |
504 | | - | |
505 | | - | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
506 | 509 | | |
507 | | - | |
508 | | - | |
509 | | - | |
510 | | - | |
511 | | - | |
512 | | - | |
513 | | - | |
514 | | - | |
515 | | - | |
516 | | - | |
517 | | - | |
518 | 510 | | |
519 | 511 | | |
520 | 512 | | |
521 | | - | |
| 513 | + | |
522 | 514 | | |
523 | 515 | | |
524 | 516 | | |
| |||
528 | 520 | | |
529 | 521 | | |
530 | 522 | | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
531 | 537 | | |
532 | 538 | | |
533 | 539 | | |
534 | | - | |
535 | 540 | | |
536 | 541 | | |
537 | 542 | | |
| |||
540 | 545 | | |
541 | 546 | | |
542 | 547 | | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
543 | 560 | | |
544 | 561 | | |
545 | 562 | | |
| |||
866 | 883 | | |
867 | 884 | | |
868 | 885 | | |
869 | | - | |
| 886 | + | |
870 | 887 | | |
871 | 888 | | |
872 | 889 | | |
873 | 890 | | |
874 | 891 | | |
875 | 892 | | |
876 | | - | |
| 893 | + | |
| 894 | + | |
877 | 895 | | |
878 | 896 | | |
879 | | - | |
| 897 | + | |
880 | 898 | | |
881 | 899 | | |
882 | 900 | | |
| |||
1267 | 1285 | | |
1268 | 1286 | | |
1269 | 1287 | | |
1270 | | - | |
1271 | | - | |
1272 | 1288 | | |
1273 | | - | |
1274 | | - | |
1275 | | - | |
1276 | | - | |
1277 | | - | |
| 1289 | + | |
1278 | 1290 | | |
1279 | 1291 | | |
1280 | 1292 | | |
| |||
1305 | 1317 | | |
1306 | 1318 | | |
1307 | 1319 | | |
1308 | | - | |
1309 | | - | |
1310 | 1320 | | |
1311 | | - | |
1312 | | - | |
1313 | | - | |
1314 | | - | |
1315 | | - | |
| 1321 | + | |
1316 | 1322 | | |
1317 | 1323 | | |
1318 | 1324 | | |
| |||
Lines changed: 3 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
| |||
12 | 11 | | |
13 | 12 | | |
14 | 13 | | |
15 | | - | |
| 14 | + | |
16 | 15 | | |
17 | 16 | | |
18 | 17 | | |
19 | 18 | | |
20 | 19 | | |
21 | 20 | | |
22 | 21 | | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
| 22 | + | |
| 23 | + | |
27 | 24 | | |
28 | 25 | | |
29 | 26 | | |
| |||
Lines changed: 9 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
5 | 8 | | |
6 | 9 | | |
7 | 10 | | |
| |||
23 | 26 | | |
24 | 27 | | |
25 | 28 | | |
26 | | - | |
| 29 | + | |
27 | 30 | | |
28 | 31 | | |
29 | 32 | | |
30 | | - | |
31 | | - | |
| 33 | + | |
| 34 | + | |
32 | 35 | | |
33 | 36 | | |
34 | 37 | | |
| |||
84 | 87 | | |
85 | 88 | | |
86 | 89 | | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
87 | 93 | | |
88 | 94 | | |
89 | 95 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| |||
0 commit comments