httpasyncclient4: fix url parsing and make host/port extraction happening#5543
Conversation
bd106ba to
25b97db
Compare
PerfectSlayer
left a comment
There was a problem hiding this comment.
I get it is breaking changes for httpasyncclient-4 integration but it should align its behavior with other client integrations, right?
yes it will made http async client 4 behave like other version of same library on the reported used case. So basically it's a bugfix |
25b97db to
e8ea069
Compare
eac65a4 to
156b26a
Compare
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 62 cases. Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.20.0-SNAPSHOT~48b7a5a8e3, baseline=1.20.0-SNAPSHOT~db25ce9317
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (986.485 ms) : 0, 986485
Total [baseline] (8.617 s) : 0, 8616886
Agent [candidate] (995.973 ms) : 0, 995973
Total [candidate] (8.712 s) : 0, 8711964
section appsec
Agent [baseline] (1.08 s) : 0, 1080296
Total [baseline] (8.734 s) : 0, 8733833
Agent [candidate] (1.072 s) : 0, 1072106
Total [candidate] (8.703 s) : 0, 8702767
section iast
Agent [baseline] (1.105 s) : 0, 1104904
Total [baseline] (9.188 s) : 0, 9188324
Agent [candidate] (1.1 s) : 0, 1100476
Total [candidate] (9.169 s) : 0, 9169014
section profiling
Agent [baseline] (1.165 s) : 0, 1164916
Total [baseline] (8.852 s) : 0, 8851965
Agent [candidate] (1.162 s) : 0, 1162181
Total [candidate] (8.865 s) : 0, 8864739
gantt
title insecure-bank - break down per module: candidate=1.20.0-SNAPSHOT~48b7a5a8e3, baseline=1.20.0-SNAPSHOT~db25ce9317
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (611.864 ms) : 0, 611864
BytebuddyAgent [candidate] (618.213 ms) : 0, 618213
GlobalTracer [baseline] (283.424 ms) : 0, 283424
GlobalTracer [candidate] (286.134 ms) : 0, 286134
AppSec [baseline] (50.174 ms) : 0, 50174
AppSec [candidate] (50.331 ms) : 0, 50331
Remote Config [baseline] (661.687 µs) : 0, 662
Remote Config [candidate] (665.378 µs) : 0, 665
Telemetry [baseline] (5.994 ms) : 0, 5994
Telemetry [candidate] (6.022 ms) : 0, 6022
section appsec
BytebuddyAgent [baseline] (617.293 ms) : 0, 617293
BytebuddyAgent [candidate] (612.627 ms) : 0, 612627
GlobalTracer [baseline] (286.03 ms) : 0, 286030
GlobalTracer [candidate] (283.75 ms) : 0, 283750
AppSec [baseline] (135.798 ms) : 0, 135798
AppSec [candidate] (135.015 ms) : 0, 135015
Remote Config [baseline] (731.663 µs) : 0, 732
Remote Config [candidate] (731.017 µs) : 0, 731
Telemetry [baseline] (5.818 ms) : 0, 5818
Telemetry [candidate] (5.75 ms) : 0, 5750
section iast
BytebuddyAgent [baseline] (728.127 ms) : 0, 728127
BytebuddyAgent [candidate] (725.129 ms) : 0, 725129
GlobalTracer [baseline] (273.416 ms) : 0, 273416
GlobalTracer [candidate] (272.651 ms) : 0, 272651
AppSec [baseline] (47.92 ms) : 0, 47920
AppSec [candidate] (47.635 ms) : 0, 47635
IAST [baseline] (14.264 ms) : 0, 14264
IAST [candidate] (14.225 ms) : 0, 14225
Remote Config [baseline] (556.788 µs) : 0, 557
Remote Config [candidate] (552.93 µs) : 0, 553
Telemetry [baseline] (5.799 ms) : 0, 5799
Telemetry [candidate] (5.778 ms) : 0, 5778
section profiling
BytebuddyAgent [baseline] (628.303 ms) : 0, 628303
BytebuddyAgent [candidate] (626.146 ms) : 0, 626146
GlobalTracer [baseline] (349.182 ms) : 0, 349182
GlobalTracer [candidate] (349.305 ms) : 0, 349305
AppSec [baseline] (49.432 ms) : 0, 49432
AppSec [candidate] (49.283 ms) : 0, 49283
Remote Config [baseline] (648.257 µs) : 0, 648
Remote Config [candidate] (641.23 µs) : 0, 641
Telemetry [baseline] (6.026 ms) : 0, 6026
Telemetry [candidate] (6.003 ms) : 0, 6003
ProfilingAgent [baseline] (78.307 ms) : 0, 78307
ProfilingAgent [candidate] (77.839 ms) : 0, 77839
Profiling [baseline] (78.331 ms) : 0, 78331
Profiling [candidate] (77.863 ms) : 0, 77863
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.20.0-SNAPSHOT~48b7a5a8e3, baseline=1.20.0-SNAPSHOT~db25ce9317
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (996.09 ms) : 0, 996090
Total [baseline] (9.218 s) : 0, 9218078
Agent [candidate] (989.365 ms) : 0, 989365
Total [candidate] (9.14 s) : 0, 9140281
section appsec
Agent [baseline] (1.079 s) : 0, 1079126
Total [baseline] (9.317 s) : 0, 9317082
Agent [candidate] (1.075 s) : 0, 1075149
Total [candidate] (9.303 s) : 0, 9302518
section iast
Agent [baseline] (1.097 s) : 0, 1096914
Total [baseline] (9.463 s) : 0, 9463330
Agent [candidate] (1.092 s) : 0, 1092257
Total [candidate] (9.42 s) : 0, 9420325
section profiling
Agent [baseline] (1.169 s) : 0, 1169210
Total [baseline] (9.474 s) : 0, 9474218
Agent [candidate] (1.163 s) : 0, 1162701
Total [candidate] (9.451 s) : 0, 9450501
gantt
title petclinic - break down per module: candidate=1.20.0-SNAPSHOT~48b7a5a8e3, baseline=1.20.0-SNAPSHOT~db25ce9317
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (617.92 ms) : 0, 617920
BytebuddyAgent [candidate] (613.308 ms) : 0, 613308
GlobalTracer [baseline] (286.558 ms) : 0, 286558
GlobalTracer [candidate] (285.031 ms) : 0, 285031
AppSec [baseline] (50.268 ms) : 0, 50268
AppSec [candidate] (50.04 ms) : 0, 50040
Remote Config [baseline] (694.062 µs) : 0, 694
Remote Config [candidate] (668.78 µs) : 0, 669
Telemetry [baseline] (6.067 ms) : 0, 6067
Telemetry [candidate] (6.003 ms) : 0, 6003
section appsec
BytebuddyAgent [baseline] (616.4 ms) : 0, 616400
BytebuddyAgent [candidate] (613.594 ms) : 0, 613594
GlobalTracer [baseline] (285.989 ms) : 0, 285989
GlobalTracer [candidate] (285.648 ms) : 0, 285648
AppSec [baseline] (135.662 ms) : 0, 135662
AppSec [candidate] (135.047 ms) : 0, 135047
Remote Config [baseline] (729.529 µs) : 0, 730
Remote Config [candidate] (733.453 µs) : 0, 733
Telemetry [baseline] (5.796 ms) : 0, 5796
Telemetry [candidate] (5.736 ms) : 0, 5736
section iast
BytebuddyAgent [baseline] (723.095 ms) : 0, 723095
BytebuddyAgent [candidate] (719.345 ms) : 0, 719345
GlobalTracer [baseline] (271.502 ms) : 0, 271502
GlobalTracer [candidate] (270.882 ms) : 0, 270882
AppSec [baseline] (47.435 ms) : 0, 47435
AppSec [candidate] (47.321 ms) : 0, 47321
IAST [baseline] (14.1 ms) : 0, 14100
IAST [candidate] (14.054 ms) : 0, 14054
Remote Config [baseline] (550.48 µs) : 0, 550
Remote Config [candidate] (556.792 µs) : 0, 557
Telemetry [baseline] (5.771 ms) : 0, 5771
Telemetry [candidate] (5.72 ms) : 0, 5720
section profiling
BytebuddyAgent [baseline] (630.146 ms) : 0, 630146
BytebuddyAgent [candidate] (626.866 ms) : 0, 626866
GlobalTracer [baseline] (349.567 ms) : 0, 349567
GlobalTracer [candidate] (349.256 ms) : 0, 349256
AppSec [baseline] (49.477 ms) : 0, 49477
AppSec [candidate] (49.258 ms) : 0, 49258
Remote Config [baseline] (662.396 µs) : 0, 662
Remote Config [candidate] (641.132 µs) : 0, 641
Telemetry [baseline] (6.081 ms) : 0, 6081
Telemetry [candidate] (5.982 ms) : 0, 5982
ProfilingAgent [baseline] (79.89 ms) : 0, 79890
ProfilingAgent [candidate] (77.596 ms) : 0, 77596
Profiling [baseline] (79.915 ms) : 0, 79915
Profiling [candidate] (77.62 ms) : 0, 77620
LoadParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 24 cases. Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.20.0-SNAPSHOT~48b7a5a8e3, baseline=1.20.0-SNAPSHOT~db25ce9317
dateFormat X
axisFormat %s
section baseline
no_agent (361.073 µs) : 340, 382
. : milestone, 361,
appsec (655.929 µs) : 635, 677
. : milestone, 656,
iast (447.474 µs) : 427, 468
. : milestone, 447,
iast_FULL (513.109 µs) : 492, 534
. : milestone, 513,
iast_INACTIVE (427.129 µs) : 406, 448
. : milestone, 427,
profiling (431.686 µs) : 410, 453
. : milestone, 432,
tracing (428.333 µs) : 408, 449
. : milestone, 428,
section candidate
no_agent (366.126 µs) : 344, 388
. : milestone, 366,
appsec (661.793 µs) : 641, 683
. : milestone, 662,
iast (451.009 µs) : 430, 472
. : milestone, 451,
iast_FULL (510.166 µs) : 490, 531
. : milestone, 510,
iast_INACTIVE (426.547 µs) : 406, 447
. : milestone, 427,
profiling (438.749 µs) : 417, 460
. : milestone, 439,
tracing (431.396 µs) : 411, 452
. : milestone, 431,
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.20.0-SNAPSHOT~48b7a5a8e3, baseline=1.20.0-SNAPSHOT~db25ce9317
dateFormat X
axisFormat %s
section baseline
no_agent (1.329 ms) : 1310, 1348
. : milestone, 1329,
appsec (1.683 ms) : 1659, 1708
. : milestone, 1683,
iast (1.459 ms) : 1435, 1483
. : milestone, 1459,
profiling (1.466 ms) : 1441, 1490
. : milestone, 1466,
tracing (1.442 ms) : 1417, 1467
. : milestone, 1442,
section candidate
no_agent (1.324 ms) : 1305, 1343
. : milestone, 1324,
appsec (1.655 ms) : 1631, 1679
. : milestone, 1655,
iast (1.455 ms) : 1431, 1479
. : milestone, 1455,
profiling (1.464 ms) : 1440, 1489
. : milestone, 1464,
tracing (1.442 ms) : 1418, 1466
. : milestone, 1442,
|
156b26a to
af90fc0
Compare
af90fc0 to
e9caeb3
Compare
|
So, what was the outcome of the discussion about the breaking behavior? |
@PerfectSlayer normally breaking change by default behind a feature flag (as done in this PR). It's ok to ship? |
What Does This Do
Http async client 4 may not produce absolute urls in
http.urltag if the client is configured with HttpHost taget and the request uri is hence relative.This happens when the client executes the request with host and port explicitly provided with a
HttpHostargument.Impacted signatures:
The side effects are:
http.urltag will miss scheme, host, portpeer.hostname,peer.portandpeer.servicetagsThis PR fixes this buggy behaviour and it's a
breaking change. It also impact the following instrumentations which are relying on httpasyncclient4:In case this change is not suitable , the old tracing flavour can be restored by adding the following feature flag:
-Ddd.httpasyncclient4.legacy.tracing.enabled=trueDD_HTTPASYNCCLIENT4_LEGACY_TRACING_ENABLED=trueMotivation
Additional Notes