-
Notifications
You must be signed in to change notification settings - Fork 291
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
Allow multivalue multiline header extraction #8112
Draft
sarahchen6
wants to merge
9
commits into
master
Choose a base branch
from
sarahchen6/allow-multiline-headers-take-2
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.
Draft
Conversation
This file contains 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
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 55 metrics, 8 unstable metrics. Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.45.0-SNAPSHOT~ec51de9c4c, baseline=1.45.0-SNAPSHOT~a19f73a5ea
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.094 s) : 0, 1093943
Total [baseline] (10.488 s) : 0, 10488182
Agent [candidate] (1.102 s) : 0, 1102468
Total [candidate] (10.512 s) : 0, 10512074
section appsec
Agent [baseline] (1.227 s) : 0, 1227043
Total [baseline] (10.684 s) : 0, 10684166
Agent [candidate] (1.227 s) : 0, 1227408
Total [candidate] (10.744 s) : 0, 10744036
section iast
Agent [baseline] (1.224 s) : 0, 1223932
Total [baseline] (11.006 s) : 0, 11005641
Agent [candidate] (1.223 s) : 0, 1223497
Total [candidate] (10.969 s) : 0, 10969100
section profiling
Agent [baseline] (1.323 s) : 0, 1323428
Total [baseline] (10.891 s) : 0, 10890967
Agent [candidate] (1.329 s) : 0, 1328614
Total [candidate] (10.94 s) : 0, 10939772
gantt
title petclinic - break down per module: candidate=1.45.0-SNAPSHOT~ec51de9c4c, baseline=1.45.0-SNAPSHOT~a19f73a5ea
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (697.363 ms) : 0, 697363
BytebuddyAgent [candidate] (701.7 ms) : 0, 701700
GlobalTracer [baseline] (316.738 ms) : 0, 316738
GlobalTracer [candidate] (319.983 ms) : 0, 319983
AppSec [baseline] (54.743 ms) : 0, 54743
AppSec [candidate] (55.379 ms) : 0, 55379
Remote Config [baseline] (658.729 µs) : 0, 659
Remote Config [candidate] (668.806 µs) : 0, 669
Telemetry [baseline] (10.692 ms) : 0, 10692
Telemetry [candidate] (10.857 ms) : 0, 10857
section appsec
BytebuddyAgent [baseline] (712.683 ms) : 0, 712683
BytebuddyAgent [candidate] (713.452 ms) : 0, 713452
GlobalTracer [baseline] (314.935 ms) : 0, 314935
GlobalTracer [candidate] (314.903 ms) : 0, 314903
AppSec [baseline] (167.821 ms) : 0, 167821
AppSec [candidate] (167.722 ms) : 0, 167722
IAST [baseline] (19.633 ms) : 0, 19633
IAST [candidate] (19.11 ms) : 0, 19110
Remote Config [baseline] (655.756 µs) : 0, 656
Remote Config [candidate] (654.11 µs) : 0, 654
Telemetry [baseline] (7.438 ms) : 0, 7438
Telemetry [candidate] (7.386 ms) : 0, 7386
section iast
BytebuddyAgent [baseline] (814.364 ms) : 0, 814364
BytebuddyAgent [candidate] (815.593 ms) : 0, 815593
GlobalTracer [baseline] (308.529 ms) : 0, 308529
GlobalTracer [candidate] (307.31 ms) : 0, 307310
AppSec [baseline] (56.419 ms) : 0, 56419
AppSec [candidate] (57.635 ms) : 0, 57635
IAST [baseline] (22.773 ms) : 0, 22773
IAST [candidate] (20.995 ms) : 0, 20995
Remote Config [baseline] (624.628 µs) : 0, 625
Remote Config [candidate] (636.186 µs) : 0, 636
Telemetry [baseline] (7.466 ms) : 0, 7466
Telemetry [candidate] (7.54 ms) : 0, 7540
section profiling
BytebuddyAgent [baseline] (693.884 ms) : 0, 693884
BytebuddyAgent [candidate] (695.814 ms) : 0, 695814
GlobalTracer [baseline] (434.113 ms) : 0, 434113
GlobalTracer [candidate] (435.826 ms) : 0, 435826
AppSec [baseline] (53.696 ms) : 0, 53696
AppSec [candidate] (54.178 ms) : 0, 54178
Remote Config [baseline] (667.618 µs) : 0, 668
Remote Config [candidate] (678.52 µs) : 0, 679
Telemetry [baseline] (7.684 ms) : 0, 7684
Telemetry [candidate] (7.754 ms) : 0, 7754
ProfilingAgent [baseline] (93.936 ms) : 0, 93936
ProfilingAgent [candidate] (94.823 ms) : 0, 94823
Profiling [baseline] (93.96 ms) : 0, 93960
Profiling [candidate] (94.846 ms) : 0, 94846
Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.45.0-SNAPSHOT~ec51de9c4c, baseline=1.45.0-SNAPSHOT~a19f73a5ea
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.099 s) : 0, 1099203
Total [baseline] (8.657 s) : 0, 8656587
Agent [candidate] (1.096 s) : 0, 1095502
Total [candidate] (8.657 s) : 0, 8656573
section iast
Agent [baseline] (1.221 s) : 0, 1221448
Total [baseline] (9.211 s) : 0, 9211447
Agent [candidate] (1.231 s) : 0, 1230728
Total [candidate] (9.209 s) : 0, 9209186
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.23 s) : 0, 1229975
Total [baseline] (9.174 s) : 0, 9173571
Agent [candidate] (1.233 s) : 0, 1233222
Total [candidate] (9.217 s) : 0, 9216936
section iast_TELEMETRY_OFF
Agent [baseline] (1.226 s) : 0, 1225541
Total [baseline] (9.235 s) : 0, 9235138
Agent [candidate] (1.218 s) : 0, 1217808
Total [candidate] (9.184 s) : 0, 9183962
gantt
title insecure-bank - break down per module: candidate=1.45.0-SNAPSHOT~ec51de9c4c, baseline=1.45.0-SNAPSHOT~a19f73a5ea
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (700.186 ms) : 0, 700186
BytebuddyAgent [candidate] (696.899 ms) : 0, 696899
GlobalTracer [baseline] (319.406 ms) : 0, 319406
GlobalTracer [candidate] (317.992 ms) : 0, 317992
AppSec [baseline] (54.475 ms) : 0, 54475
AppSec [candidate] (54.853 ms) : 0, 54853
Remote Config [baseline] (660.653 µs) : 0, 661
Remote Config [candidate] (674.889 µs) : 0, 675
Telemetry [baseline] (10.688 ms) : 0, 10688
Telemetry [candidate] (11.298 ms) : 0, 11298
section iast
BytebuddyAgent [baseline] (814.87 ms) : 0, 814870
BytebuddyAgent [candidate] (821.328 ms) : 0, 821328
GlobalTracer [baseline] (306.257 ms) : 0, 306257
GlobalTracer [candidate] (308.547 ms) : 0, 308547
AppSec [baseline] (57.604 ms) : 0, 57604
AppSec [candidate] (57.844 ms) : 0, 57844
IAST [baseline] (20.906 ms) : 0, 20906
IAST [candidate] (21.009 ms) : 0, 21009
Remote Config [baseline] (605.799 µs) : 0, 606
Remote Config [candidate] (630.957 µs) : 0, 631
Telemetry [baseline] (7.435 ms) : 0, 7435
Telemetry [candidate] (7.469 ms) : 0, 7469
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (820.566 ms) : 0, 820566
BytebuddyAgent [candidate] (822.211 ms) : 0, 822211
GlobalTracer [baseline] (308.673 ms) : 0, 308673
GlobalTracer [candidate] (309.835 ms) : 0, 309835
AppSec [baseline] (56.821 ms) : 0, 56821
AppSec [candidate] (57.177 ms) : 0, 57177
IAST [baseline] (22.006 ms) : 0, 22006
IAST [candidate] (22.037 ms) : 0, 22037
Remote Config [baseline] (625.502 µs) : 0, 626
Remote Config [candidate] (616.701 µs) : 0, 617
Telemetry [baseline] (7.48 ms) : 0, 7480
Telemetry [candidate] (7.462 ms) : 0, 7462
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (816.93 ms) : 0, 816930
BytebuddyAgent [candidate] (810.973 ms) : 0, 810973
GlobalTracer [baseline] (307.577 ms) : 0, 307577
GlobalTracer [candidate] (306.245 ms) : 0, 306245
AppSec [baseline] (57.453 ms) : 0, 57453
AppSec [candidate] (57.28 ms) : 0, 57280
IAST [baseline] (21.712 ms) : 0, 21712
IAST [candidate] (21.516 ms) : 0, 21516
Remote Config [baseline] (607.351 µs) : 0, 607
Remote Config [candidate] (615.344 µs) : 0, 615
Telemetry [baseline] (7.434 ms) : 0, 7434
Telemetry [candidate] (7.402 ms) : 0, 7402
LoadParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 11 metrics, 17 unstable metrics. Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.45.0-SNAPSHOT~ec51de9c4c, baseline=1.45.0-SNAPSHOT~a19f73a5ea
dateFormat X
axisFormat %s
section baseline
no_agent (377.328 µs) : 358, 397
. : milestone, 377,
iast (496.619 µs) : 475, 519
. : milestone, 497,
iast_FULL (657.266 µs) : 635, 679
. : milestone, 657,
iast_GLOBAL (527.309 µs) : 506, 549
. : milestone, 527,
iast_HARDCODED_SECRET_DISABLED (487.73 µs) : 466, 509
. : milestone, 488,
iast_INACTIVE (457.838 µs) : 436, 479
. : milestone, 458,
iast_TELEMETRY_OFF (481.244 µs) : 460, 503
. : milestone, 481,
tracing (454.829 µs) : 433, 477
. : milestone, 455,
section candidate
no_agent (379.664 µs) : 360, 400
. : milestone, 380,
iast (488.3 µs) : 467, 510
. : milestone, 488,
iast_FULL (655.926 µs) : 634, 678
. : milestone, 656,
iast_GLOBAL (515.526 µs) : 494, 537
. : milestone, 516,
iast_HARDCODED_SECRET_DISABLED (493.778 µs) : 472, 516
. : milestone, 494,
iast_INACTIVE (457.718 µs) : 436, 479
. : milestone, 458,
iast_TELEMETRY_OFF (482.355 µs) : 461, 504
. : milestone, 482,
tracing (457.675 µs) : 436, 480
. : milestone, 458,
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.45.0-SNAPSHOT~ec51de9c4c, baseline=1.45.0-SNAPSHOT~a19f73a5ea
dateFormat X
axisFormat %s
section baseline
no_agent (1.357 ms) : 1336, 1377
. : milestone, 1357,
appsec (1.763 ms) : 1740, 1787
. : milestone, 1763,
appsec_no_iast (1.762 ms) : 1737, 1787
. : milestone, 1762,
iast (1.493 ms) : 1470, 1516
. : milestone, 1493,
profiling (1.531 ms) : 1507, 1555
. : milestone, 1531,
tracing (1.469 ms) : 1445, 1494
. : milestone, 1469,
section candidate
no_agent (1.353 ms) : 1333, 1372
. : milestone, 1353,
appsec (1.755 ms) : 1732, 1778
. : milestone, 1755,
appsec_no_iast (1.789 ms) : 1765, 1814
. : milestone, 1789,
iast (1.506 ms) : 1483, 1528
. : milestone, 1506,
profiling (1.511 ms) : 1487, 1534
. : milestone, 1511,
tracing (1.493 ms) : 1469, 1518
. : milestone, 1493,
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 biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.45.0-SNAPSHOT~ec51de9c4c, baseline=1.45.0-SNAPSHOT~a19f73a5ea
dateFormat X
axisFormat %s
section baseline
no_agent (15.481 s) : 15481000, 15481000
. : milestone, 15481000,
appsec (14.755 s) : 14755000, 14755000
. : milestone, 14755000,
iast (18.747 s) : 18747000, 18747000
. : milestone, 18747000,
iast_GLOBAL (17.797 s) : 17797000, 17797000
. : milestone, 17797000,
profiling (15.499 s) : 15499000, 15499000
. : milestone, 15499000,
tracing (14.998 s) : 14998000, 14998000
. : milestone, 14998000,
section candidate
no_agent (14.864 s) : 14864000, 14864000
. : milestone, 14864000,
appsec (14.777 s) : 14777000, 14777000
. : milestone, 14777000,
iast (18.805 s) : 18805000, 18805000
. : milestone, 18805000,
iast_GLOBAL (18.218 s) : 18218000, 18218000
. : milestone, 18218000,
profiling (14.952 s) : 14952000, 14952000
. : milestone, 14952000,
tracing (14.969 s) : 14969000, 14969000
. : milestone, 14969000,
Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.45.0-SNAPSHOT~ec51de9c4c, baseline=1.45.0-SNAPSHOT~a19f73a5ea
dateFormat X
axisFormat %s
section baseline
no_agent (1.473 ms) : 1462, 1485
. : milestone, 1473,
appsec (2.37 ms) : 2328, 2413
. : milestone, 2370,
iast (2.109 ms) : 2055, 2163
. : milestone, 2109,
iast_GLOBAL (2.152 ms) : 2098, 2206
. : milestone, 2152,
profiling (1.964 ms) : 1921, 2006
. : milestone, 1964,
tracing (1.954 ms) : 1913, 1996
. : milestone, 1954,
section candidate
no_agent (1.478 ms) : 1467, 1490
. : milestone, 1478,
appsec (2.382 ms) : 2338, 2425
. : milestone, 2382,
iast (2.122 ms) : 2068, 2177
. : milestone, 2122,
iast_GLOBAL (2.158 ms) : 2104, 2212
. : milestone, 2158,
profiling (1.988 ms) : 1944, 2032
. : milestone, 1988,
tracing (1.951 ms) : 1910, 1993
. : milestone, 1951,
|
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
The goal of this PR is to support multi-value multi-line HTTP header extraction. To do so, it
headers
data struct fromMap<String, String>
toList<List<String>>
to support multiple values with the same header. ThedoRequest
method calls need to be updated as a result.getRequestHeader
andgetResponseHeader
methods in the client decorators for Apache and Grizzly to retrieve multiple header values instead of just the first.HttpClientTest
to test multiple values for the same header.Motivation
Currently, HTTP protocol allows splitting the header into multiple lines per value. For example,
header: value1, header: value2, header: value3
. However, the Java tracer extracts only the first value of an http header and will oftentimes override the original header value when trying to set another value. This PR attempts to provide support from the tracer for multiple values under the same header.Additional Notes
This is a cleaned up version of #7996.
Not all client decorators support multiple header values (e.g. jetty-client-9.1, spring-webflux-5, google-http-client, netty-4.1, and http-url-connection) because they use a
.set
method or map data structure somewhere that overrides header values when a new value with the same header name is introduced. Open to ideas on how to address this!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: https://datadoghq.atlassian.net/browse/AIDM-273