Fix content-type extraction for akka-http#10742
Fix content-type extraction for akka-http#10742gh-worker-dd-mergequeue-cf854d[bot] merged 2 commits intomasterfrom
Conversation
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 64 metrics, 7 unstable metrics. Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.61.0-SNAPSHOT~82fac88ec1, baseline=1.61.0-SNAPSHOT~1108a4f664
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.062 s) : 0, 1061947
Total [baseline] (8.859 s) : 0, 8859089
Agent [candidate] (1.058 s) : 0, 1058432
Total [candidate] (8.839 s) : 0, 8839261
section iast
Agent [baseline] (1.225 s) : 0, 1224612
Total [baseline] (9.587 s) : 0, 9586912
Agent [candidate] (1.234 s) : 0, 1234467
Total [candidate] (9.609 s) : 0, 9608503
gantt
title insecure-bank - break down per module: candidate=1.61.0-SNAPSHOT~82fac88ec1, baseline=1.61.0-SNAPSHOT~1108a4f664
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.213 ms) : 0, 1213
crashtracking [candidate] (1.197 ms) : 0, 1197
BytebuddyAgent [baseline] (630.988 ms) : 0, 630988
BytebuddyAgent [candidate] (628.315 ms) : 0, 628315
AgentMeter [baseline] (29.146 ms) : 0, 29146
AgentMeter [candidate] (29.119 ms) : 0, 29119
GlobalTracer [baseline] (257.787 ms) : 0, 257787
GlobalTracer [candidate] (257.266 ms) : 0, 257266
AppSec [baseline] (31.559 ms) : 0, 31559
AppSec [candidate] (31.405 ms) : 0, 31405
Debugger [baseline] (58.844 ms) : 0, 58844
Debugger [candidate] (58.575 ms) : 0, 58575
Remote Config [baseline] (587.266 µs) : 0, 587
Remote Config [candidate] (586.096 µs) : 0, 586
Telemetry [baseline] (8.604 ms) : 0, 8604
Telemetry [candidate] (8.685 ms) : 0, 8685
Flare Poller [baseline] (7.11 ms) : 0, 7110
Flare Poller [candidate] (7.225 ms) : 0, 7225
section iast
crashtracking [baseline] (1.195 ms) : 0, 1195
crashtracking [candidate] (1.205 ms) : 0, 1205
BytebuddyAgent [baseline] (794.07 ms) : 0, 794070
BytebuddyAgent [candidate] (802.466 ms) : 0, 802466
AgentMeter [baseline] (11.285 ms) : 0, 11285
AgentMeter [candidate] (11.586 ms) : 0, 11586
GlobalTracer [baseline] (246.924 ms) : 0, 246924
GlobalTracer [candidate] (248.577 ms) : 0, 248577
IAST [baseline] (25.137 ms) : 0, 25137
IAST [candidate] (25.168 ms) : 0, 25168
AppSec [baseline] (27.241 ms) : 0, 27241
AppSec [candidate] (26.314 ms) : 0, 26314
Debugger [baseline] (62.332 ms) : 0, 62332
Debugger [candidate] (62.594 ms) : 0, 62594
Remote Config [baseline] (528.187 µs) : 0, 528
Remote Config [candidate] (525.116 µs) : 0, 525
Telemetry [baseline] (14.886 ms) : 0, 14886
Telemetry [candidate] (14.856 ms) : 0, 14856
Flare Poller [baseline] (4.902 ms) : 0, 4902
Flare Poller [candidate] (4.896 ms) : 0, 4896
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.61.0-SNAPSHOT~82fac88ec1, baseline=1.61.0-SNAPSHOT~1108a4f664
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.062 s) : 0, 1061694
Total [baseline] (11.043 s) : 0, 11042519
Agent [candidate] (1.06 s) : 0, 1059902
Total [candidate] (11.006 s) : 0, 11005590
section appsec
Agent [baseline] (1.244 s) : 0, 1244244
Total [baseline] (11.144 s) : 0, 11143556
Agent [candidate] (1.253 s) : 0, 1253459
Total [candidate] (11.259 s) : 0, 11259479
section iast
Agent [baseline] (1.226 s) : 0, 1225982
Total [baseline] (11.417 s) : 0, 11416634
Agent [candidate] (1.243 s) : 0, 1242542
Total [candidate] (11.447 s) : 0, 11446730
section profiling
Agent [baseline] (1.181 s) : 0, 1180895
Total [baseline] (11.127 s) : 0, 11126678
Agent [candidate] (1.188 s) : 0, 1188094
Total [candidate] (11.123 s) : 0, 11123386
gantt
title petclinic - break down per module: candidate=1.61.0-SNAPSHOT~82fac88ec1, baseline=1.61.0-SNAPSHOT~1108a4f664
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.205 ms) : 0, 1205
crashtracking [candidate] (1.203 ms) : 0, 1203
BytebuddyAgent [baseline] (631.746 ms) : 0, 631746
BytebuddyAgent [candidate] (629.691 ms) : 0, 629691
AgentMeter [baseline] (29.269 ms) : 0, 29269
AgentMeter [candidate] (29.174 ms) : 0, 29174
GlobalTracer [baseline] (257.767 ms) : 0, 257767
GlobalTracer [candidate] (257.566 ms) : 0, 257566
AppSec [baseline] (31.635 ms) : 0, 31635
AppSec [candidate] (31.348 ms) : 0, 31348
Debugger [baseline] (59.605 ms) : 0, 59605
Debugger [candidate] (59.181 ms) : 0, 59181
Remote Config [baseline] (604.314 µs) : 0, 604
Remote Config [candidate] (579.431 µs) : 0, 579
Telemetry [baseline] (8.709 ms) : 0, 8709
Telemetry [candidate] (8.63 ms) : 0, 8630
Flare Poller [baseline] (5.045 ms) : 0, 5045
Flare Poller [candidate] (6.435 ms) : 0, 6435
section appsec
crashtracking [baseline] (1.198 ms) : 0, 1198
crashtracking [candidate] (1.218 ms) : 0, 1218
BytebuddyAgent [baseline] (656.876 ms) : 0, 656876
BytebuddyAgent [candidate] (658.789 ms) : 0, 658789
AgentMeter [baseline] (11.946 ms) : 0, 11946
AgentMeter [candidate] (12.043 ms) : 0, 12043
GlobalTracer [baseline] (257.93 ms) : 0, 257930
GlobalTracer [candidate] (260.958 ms) : 0, 260958
AppSec [baseline] (177.492 ms) : 0, 177492
AppSec [candidate] (179.539 ms) : 0, 179539
Debugger [baseline] (65.443 ms) : 0, 65443
Debugger [candidate] (66.471 ms) : 0, 66471
Remote Config [baseline] (569.91 µs) : 0, 570
Remote Config [candidate] (584.98 µs) : 0, 585
Telemetry [baseline] (8.984 ms) : 0, 8984
Telemetry [candidate] (9.292 ms) : 0, 9292
Flare Poller [baseline] (3.577 ms) : 0, 3577
Flare Poller [candidate] (3.705 ms) : 0, 3705
IAST [baseline] (23.874 ms) : 0, 23874
IAST [candidate] (24.371 ms) : 0, 24371
section iast
crashtracking [baseline] (1.198 ms) : 0, 1198
crashtracking [candidate] (1.215 ms) : 0, 1215
BytebuddyAgent [baseline] (795.034 ms) : 0, 795034
BytebuddyAgent [candidate] (807.152 ms) : 0, 807152
AgentMeter [baseline] (11.326 ms) : 0, 11326
AgentMeter [candidate] (11.847 ms) : 0, 11847
GlobalTracer [baseline] (247.436 ms) : 0, 247436
GlobalTracer [candidate] (249.899 ms) : 0, 249899
AppSec [baseline] (27.101 ms) : 0, 27101
AppSec [candidate] (26.781 ms) : 0, 26781
Debugger [baseline] (62.475 ms) : 0, 62475
Debugger [candidate] (63.499 ms) : 0, 63499
Remote Config [baseline] (530.005 µs) : 0, 530
Remote Config [candidate] (539.753 µs) : 0, 540
Telemetry [baseline] (14.849 ms) : 0, 14849
Telemetry [candidate] (14.789 ms) : 0, 14789
Flare Poller [baseline] (4.923 ms) : 0, 4923
Flare Poller [candidate] (4.897 ms) : 0, 4897
IAST [baseline] (25.101 ms) : 0, 25101
IAST [candidate] (25.605 ms) : 0, 25605
section profiling
ProfilingAgent [baseline] (94.251 ms) : 0, 94251
ProfilingAgent [candidate] (94.817 ms) : 0, 94817
crashtracking [baseline] (1.167 ms) : 0, 1167
crashtracking [candidate] (1.175 ms) : 0, 1175
BytebuddyAgent [baseline] (681.775 ms) : 0, 681775
BytebuddyAgent [candidate] (685.622 ms) : 0, 685622
AgentMeter [baseline] (8.562 ms) : 0, 8562
AgentMeter [candidate] (8.644 ms) : 0, 8644
GlobalTracer [baseline] (215.278 ms) : 0, 215278
GlobalTracer [candidate] (217.024 ms) : 0, 217024
AppSec [baseline] (31.661 ms) : 0, 31661
AppSec [candidate] (32.131 ms) : 0, 32131
Debugger [baseline] (61.982 ms) : 0, 61982
Debugger [candidate] (64.655 ms) : 0, 64655
Remote Config [baseline] (571.557 µs) : 0, 572
Remote Config [candidate] (578.171 µs) : 0, 578
Telemetry [baseline] (10.507 ms) : 0, 10507
Telemetry [candidate] (8.98 ms) : 0, 8980
Flare Poller [baseline] (4.327 ms) : 0, 4327
Flare Poller [candidate] (3.532 ms) : 0, 3532
Profiling [baseline] (94.828 ms) : 0, 94828
Profiling [candidate] (95.383 ms) : 0, 95383
LoadParameters
See matching parameters
SummaryFound 2 performance improvements and 2 performance regressions! Performance is the same for 16 metrics, 16 unstable metrics.
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.61.0-SNAPSHOT~82fac88ec1, baseline=1.61.0-SNAPSHOT~1108a4f664
dateFormat X
axisFormat %s
section baseline
no_agent (1.204 ms) : 1192, 1216
. : milestone, 1204,
iast (3.123 ms) : 3081, 3165
. : milestone, 3123,
iast_FULL (5.729 ms) : 5673, 5786
. : milestone, 5729,
iast_GLOBAL (3.7 ms) : 3637, 3763
. : milestone, 3700,
profiling (2.039 ms) : 2021, 2058
. : milestone, 2039,
tracing (1.755 ms) : 1741, 1770
. : milestone, 1755,
section candidate
no_agent (1.182 ms) : 1170, 1193
. : milestone, 1182,
iast (3.278 ms) : 3235, 3321
. : milestone, 3278,
iast_FULL (5.708 ms) : 5651, 5765
. : milestone, 5708,
iast_GLOBAL (3.592 ms) : 3535, 3650
. : milestone, 3592,
profiling (1.961 ms) : 1945, 1978
. : milestone, 1961,
tracing (1.828 ms) : 1812, 1844
. : milestone, 1828,
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.61.0-SNAPSHOT~82fac88ec1, baseline=1.61.0-SNAPSHOT~1108a4f664
dateFormat X
axisFormat %s
section baseline
no_agent (17.082 ms) : 16912, 17253
. : milestone, 17082,
appsec (19.42 ms) : 19217, 19623
. : milestone, 19420,
code_origins (17.84 ms) : 17663, 18016
. : milestone, 17840,
iast (17.44 ms) : 17266, 17613
. : milestone, 17440,
profiling (19.612 ms) : 19416, 19808
. : milestone, 19612,
tracing (18.704 ms) : 18514, 18895
. : milestone, 18704,
section candidate
no_agent (18.244 ms) : 18053, 18436
. : milestone, 18244,
appsec (18.443 ms) : 18256, 18630
. : milestone, 18443,
code_origins (17.736 ms) : 17563, 17909
. : milestone, 17736,
iast (17.546 ms) : 17372, 17721
. : milestone, 17546,
profiling (19.523 ms) : 19323, 19723
. : milestone, 19523,
tracing (17.735 ms) : 17556, 17913
. : milestone, 17735,
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.61.0-SNAPSHOT~82fac88ec1, baseline=1.61.0-SNAPSHOT~1108a4f664
dateFormat X
axisFormat %s
section baseline
no_agent (15.001 s) : 15001000, 15001000
. : milestone, 15001000,
appsec (14.581 s) : 14581000, 14581000
. : milestone, 14581000,
iast (17.857 s) : 17857000, 17857000
. : milestone, 17857000,
iast_GLOBAL (17.82 s) : 17820000, 17820000
. : milestone, 17820000,
profiling (15.037 s) : 15037000, 15037000
. : milestone, 15037000,
tracing (15.154 s) : 15154000, 15154000
. : milestone, 15154000,
section candidate
no_agent (14.952 s) : 14952000, 14952000
. : milestone, 14952000,
appsec (14.755 s) : 14755000, 14755000
. : milestone, 14755000,
iast (18.058 s) : 18058000, 18058000
. : milestone, 18058000,
iast_GLOBAL (17.757 s) : 17757000, 17757000
. : milestone, 17757000,
profiling (15.513 s) : 15513000, 15513000
. : milestone, 15513000,
tracing (15.09 s) : 15090000, 15090000
. : milestone, 15090000,
Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.61.0-SNAPSHOT~82fac88ec1, baseline=1.61.0-SNAPSHOT~1108a4f664
dateFormat X
axisFormat %s
section baseline
no_agent (1.467 ms) : 1456, 1479
. : milestone, 1467,
appsec (3.767 ms) : 3546, 3988
. : milestone, 3767,
iast (2.25 ms) : 2180, 2319
. : milestone, 2250,
iast_GLOBAL (2.284 ms) : 2215, 2354
. : milestone, 2284,
profiling (2.099 ms) : 2043, 2155
. : milestone, 2099,
tracing (2.058 ms) : 2004, 2112
. : milestone, 2058,
section candidate
no_agent (1.47 ms) : 1458, 1481
. : milestone, 1470,
appsec (2.507 ms) : 2452, 2562
. : milestone, 2507,
iast (2.247 ms) : 2178, 2316
. : milestone, 2247,
iast_GLOBAL (2.288 ms) : 2219, 2357
. : milestone, 2288,
profiling (2.069 ms) : 2015, 2124
. : milestone, 2069,
tracing (2.045 ms) : 1992, 2098
. : milestone, 2045,
|
|
/merge |
|
View all feedbacks in Devflow UI.
The expected merge time in
|
a35ba74
into
master
What Does This Do
Content-Typefrom anyHttpEntity, not onlyHttpEntity.Strict.content-typeextraction for streaming POST requests (HttpEntity.Default).content-length(still only extracted forStrictentities).Motivation
Fixes the flaky system test:
tests.appsec.test_event_tracking_v2.Test_UserLoginFailureEventV2_HeaderCollection_AppsecEnabledThe flakiness was caused by Akka HTTP entity type being timing-dependent.
In Akka HTTP,
Content-Typelives in the entity, not in the regular headers. The instrumentation previously extracted it only forHttpEntity.Strict(fully buffered body). However, POST requests can arrive asHttpEntity.Default(streaming) when the body is not fully received in the same TCP segment as the headers.For small bodies, this behavior is non-deterministic, leading to intermittent test failures.
Additional Notes
Strict,Default,Chunked, etc.) extendHttpEntityand exposecontentType(), so checking against the base trait ensures full coverage.contentType.value()safely handlesContentType.NoContentType(Akka’s sentinel for "no content type", which returns"").content-lengthextraction remains restricted toStrictentities to preserve existing behavior.Flakiness checked in https://github.com/DataDog/system-tests/actions/runs/22708917194
Contributor Checklist
type:and (comp:orinst:) labels in addition to any other useful labelsclose,fix, or any linking keywords when referencing an issueUse
solvesinstead, and assign the PR milestone to the issueJira ticket: APPSEC-61554
Note: Once your PR is ready to merge, add it to the merge queue by commenting
/merge./merge -ccancels the queue request./merge -f --reason "reason"skips all merge queue checks; please use this judiciously, as some checks do not run at the PR-level. For more information, see this doc.