Move network.client.ip out of AppSec into HttpServerDecorator#11208
Open
Move network.client.ip out of AppSec into HttpServerDecorator#11208
Conversation
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 62 metrics, 9 unstable metrics. Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.62.0-SNAPSHOT~c716c8233c, baseline=1.62.0-SNAPSHOT~1b63a9dfca
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.07 s) : 0, 1069596
Total [baseline] (8.878 s) : 0, 8878393
Agent [candidate] (1.063 s) : 0, 1063233
Total [candidate] (8.844 s) : 0, 8843917
section iast
Agent [baseline] (1.248 s) : 0, 1248409
Total [baseline] (9.521 s) : 0, 9520640
Agent [candidate] (1.243 s) : 0, 1242667
Total [candidate] (9.52 s) : 0, 9519703
gantt
title insecure-bank - break down per module: candidate=1.62.0-SNAPSHOT~c716c8233c, baseline=1.62.0-SNAPSHOT~1b63a9dfca
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.245 ms) : 0, 1245
crashtracking [candidate] (1.226 ms) : 0, 1226
BytebuddyAgent [baseline] (640.361 ms) : 0, 640361
BytebuddyAgent [candidate] (635.409 ms) : 0, 635409
AgentMeter [baseline] (29.443 ms) : 0, 29443
AgentMeter [candidate] (29.478 ms) : 0, 29478
GlobalTracer [baseline] (248.979 ms) : 0, 248979
GlobalTracer [candidate] (249.017 ms) : 0, 249017
AppSec [baseline] (32.851 ms) : 0, 32851
AppSec [candidate] (32.719 ms) : 0, 32719
Debugger [baseline] (60.075 ms) : 0, 60075
Debugger [candidate] (59.897 ms) : 0, 59897
Remote Config [baseline] (604.555 µs) : 0, 605
Remote Config [candidate] (606.49 µs) : 0, 606
Telemetry [baseline] (10.65 ms) : 0, 10650
Telemetry [candidate] (8.429 ms) : 0, 8429
Flare Poller [baseline] (9.136 ms) : 0, 9136
Flare Poller [candidate] (10.501 ms) : 0, 10501
section iast
crashtracking [baseline] (1.235 ms) : 0, 1235
crashtracking [candidate] (1.228 ms) : 0, 1228
BytebuddyAgent [baseline] (829.092 ms) : 0, 829092
BytebuddyAgent [candidate] (822.922 ms) : 0, 822922
AgentMeter [baseline] (11.291 ms) : 0, 11291
AgentMeter [candidate] (11.291 ms) : 0, 11291
GlobalTracer [baseline] (236.964 ms) : 0, 236964
GlobalTracer [candidate] (237.689 ms) : 0, 237689
IAST [baseline] (28.249 ms) : 0, 28249
IAST [candidate] (29.782 ms) : 0, 29782
AppSec [baseline] (31.165 ms) : 0, 31165
AppSec [candidate] (29.594 ms) : 0, 29594
Debugger [baseline] (62.396 ms) : 0, 62396
Debugger [candidate] (62.423 ms) : 0, 62423
Remote Config [baseline] (521.661 µs) : 0, 522
Remote Config [candidate] (533.236 µs) : 0, 533
Telemetry [baseline] (7.933 ms) : 0, 7933
Telemetry [candidate] (7.874 ms) : 0, 7874
Flare Poller [baseline] (3.362 ms) : 0, 3362
Flare Poller [candidate] (3.357 ms) : 0, 3357
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.62.0-SNAPSHOT~c716c8233c, baseline=1.62.0-SNAPSHOT~1b63a9dfca
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.072 s) : 0, 1071894
Total [baseline] (11.102 s) : 0, 11101628
Agent [candidate] (1.064 s) : 0, 1064395
Total [candidate] (11.062 s) : 0, 11062175
section appsec
Agent [baseline] (1.268 s) : 0, 1268461
Total [baseline] (11.023 s) : 0, 11023323
Agent [candidate] (1.275 s) : 0, 1275478
Total [candidate] (11.114 s) : 0, 11114470
section iast
Agent [baseline] (1.252 s) : 0, 1252477
Total [baseline] (11.3 s) : 0, 11300279
Agent [candidate] (1.246 s) : 0, 1245969
Total [candidate] (11.366 s) : 0, 11366262
section profiling
Agent [baseline] (1.196 s) : 0, 1196227
Total [baseline] (10.971 s) : 0, 10970526
Agent [candidate] (1.194 s) : 0, 1194377
Total [candidate] (10.994 s) : 0, 10994274
gantt
title petclinic - break down per module: candidate=1.62.0-SNAPSHOT~c716c8233c, baseline=1.62.0-SNAPSHOT~1b63a9dfca
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.234 ms) : 0, 1234
crashtracking [candidate] (1.232 ms) : 0, 1232
BytebuddyAgent [baseline] (641.294 ms) : 0, 641294
BytebuddyAgent [candidate] (635.381 ms) : 0, 635381
AgentMeter [baseline] (29.75 ms) : 0, 29750
AgentMeter [candidate] (29.395 ms) : 0, 29395
GlobalTracer [baseline] (250.715 ms) : 0, 250715
GlobalTracer [candidate] (249.009 ms) : 0, 249009
AppSec [baseline] (33.001 ms) : 0, 33001
AppSec [candidate] (32.612 ms) : 0, 32612
Debugger [baseline] (61.611 ms) : 0, 61611
Debugger [candidate] (60.492 ms) : 0, 60492
Remote Config [baseline] (590.007 µs) : 0, 590
Remote Config [candidate] (596.088 µs) : 0, 596
Telemetry [baseline] (9.138 ms) : 0, 9138
Telemetry [candidate] (9.199 ms) : 0, 9199
Flare Poller [baseline] (8.393 ms) : 0, 8393
Flare Poller [candidate] (10.475 ms) : 0, 10475
section appsec
crashtracking [baseline] (1.259 ms) : 0, 1259
crashtracking [candidate] (1.213 ms) : 0, 1213
BytebuddyAgent [baseline] (676.912 ms) : 0, 676912
BytebuddyAgent [candidate] (680.767 ms) : 0, 680767
AgentMeter [baseline] (12.192 ms) : 0, 12192
AgentMeter [candidate] (12.35 ms) : 0, 12350
GlobalTracer [baseline] (249.547 ms) : 0, 249547
GlobalTracer [candidate] (251.24 ms) : 0, 251240
IAST [baseline] (24.681 ms) : 0, 24681
IAST [candidate] (24.862 ms) : 0, 24862
AppSec [baseline] (185.502 ms) : 0, 185502
AppSec [candidate] (186.474 ms) : 0, 186474
Debugger [baseline] (65.231 ms) : 0, 65231
Debugger [candidate] (65.299 ms) : 0, 65299
Remote Config [baseline] (580.431 µs) : 0, 580
Remote Config [candidate] (581.812 µs) : 0, 582
Telemetry [baseline] (7.92 ms) : 0, 7920
Telemetry [candidate] (7.915 ms) : 0, 7915
Flare Poller [baseline] (7.907 ms) : 0, 7907
Flare Poller [candidate] (8.083 ms) : 0, 8083
section iast
crashtracking [baseline] (1.23 ms) : 0, 1230
crashtracking [candidate] (1.226 ms) : 0, 1226
BytebuddyAgent [baseline] (829.631 ms) : 0, 829631
BytebuddyAgent [candidate] (824.343 ms) : 0, 824343
AgentMeter [baseline] (11.378 ms) : 0, 11378
AgentMeter [candidate] (11.297 ms) : 0, 11297
GlobalTracer [baseline] (239.637 ms) : 0, 239637
GlobalTracer [candidate] (237.975 ms) : 0, 237975
IAST [baseline] (27.399 ms) : 0, 27399
IAST [candidate] (27.488 ms) : 0, 27488
AppSec [baseline] (31.665 ms) : 0, 31665
AppSec [candidate] (32.341 ms) : 0, 32341
Debugger [baseline] (63.374 ms) : 0, 63374
Debugger [candidate] (63.101 ms) : 0, 63101
Remote Config [baseline] (525.64 µs) : 0, 526
Remote Config [candidate] (523.12 µs) : 0, 523
Telemetry [baseline] (7.907 ms) : 0, 7907
Telemetry [candidate] (7.97 ms) : 0, 7970
Flare Poller [baseline] (3.406 ms) : 0, 3406
Flare Poller [candidate] (3.429 ms) : 0, 3429
section profiling
crashtracking [baseline] (1.186 ms) : 0, 1186
crashtracking [candidate] (1.185 ms) : 0, 1185
BytebuddyAgent [baseline] (698.055 ms) : 0, 698055
BytebuddyAgent [candidate] (697.705 ms) : 0, 697705
AgentMeter [baseline] (9.016 ms) : 0, 9016
AgentMeter [candidate] (8.978 ms) : 0, 8978
GlobalTracer [baseline] (209.881 ms) : 0, 209881
GlobalTracer [candidate] (209.169 ms) : 0, 209169
AppSec [baseline] (33.041 ms) : 0, 33041
AppSec [candidate] (32.906 ms) : 0, 32906
Debugger [baseline] (66.23 ms) : 0, 66230
Debugger [candidate] (66.113 ms) : 0, 66113
Remote Config [baseline] (587.339 µs) : 0, 587
Remote Config [candidate] (570.149 µs) : 0, 570
Telemetry [baseline] (8.135 ms) : 0, 8135
Telemetry [candidate] (8.056 ms) : 0, 8056
Flare Poller [baseline] (3.565 ms) : 0, 3565
Flare Poller [candidate] (3.517 ms) : 0, 3517
ProfilingAgent [baseline] (94.365 ms) : 0, 94365
ProfilingAgent [candidate] (94.331 ms) : 0, 94331
Profiling [baseline] (94.93 ms) : 0, 94930
Profiling [candidate] (94.898 ms) : 0, 94898
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.62.0-SNAPSHOT~c716c8233c, baseline=1.62.0-SNAPSHOT~1b63a9dfca
dateFormat X
axisFormat %s
section baseline
no_agent (1.354 ms) : 1339, 1368
. : milestone, 1354,
iast (3.488 ms) : 3443, 3534
. : milestone, 3488,
iast_FULL (5.993 ms) : 5932, 6053
. : milestone, 5993,
iast_GLOBAL (3.707 ms) : 3648, 3765
. : milestone, 3707,
profiling (2.436 ms) : 2412, 2460
. : milestone, 2436,
tracing (1.886 ms) : 1871, 1901
. : milestone, 1886,
section candidate
no_agent (1.23 ms) : 1219, 1241
. : milestone, 1230,
iast (3.328 ms) : 3285, 3372
. : milestone, 3328,
iast_FULL (5.964 ms) : 5904, 6025
. : milestone, 5964,
iast_GLOBAL (3.719 ms) : 3656, 3781
. : milestone, 3719,
profiling (2.169 ms) : 2149, 2189
. : milestone, 2169,
tracing (1.947 ms) : 1930, 1963
. : milestone, 1947,
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.62.0-SNAPSHOT~c716c8233c, baseline=1.62.0-SNAPSHOT~1b63a9dfca
dateFormat X
axisFormat %s
section baseline
no_agent (18.857 ms) : 18667, 19046
. : milestone, 18857,
appsec (18.955 ms) : 18761, 19148
. : milestone, 18955,
code_origins (17.729 ms) : 17554, 17904
. : milestone, 17729,
iast (18.118 ms) : 17935, 18301
. : milestone, 18118,
profiling (17.966 ms) : 17790, 18141
. : milestone, 17966,
tracing (17.937 ms) : 17762, 18112
. : milestone, 17937,
section candidate
no_agent (18.072 ms) : 17890, 18254
. : milestone, 18072,
appsec (19.814 ms) : 19613, 20016
. : milestone, 19814,
code_origins (18.826 ms) : 18639, 19013
. : milestone, 18826,
iast (18.458 ms) : 18270, 18645
. : milestone, 18458,
profiling (18.134 ms) : 17953, 18315
. : milestone, 18134,
tracing (18.077 ms) : 17895, 18258
. : milestone, 18077,
DacapoParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 11 metrics, 1 unstable metrics. Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.62.0-SNAPSHOT~c716c8233c, baseline=1.62.0-SNAPSHOT~1b63a9dfca
dateFormat X
axisFormat %s
section baseline
no_agent (15.453 s) : 15453000, 15453000
. : milestone, 15453000,
appsec (14.74 s) : 14740000, 14740000
. : milestone, 14740000,
iast (18.816 s) : 18816000, 18816000
. : milestone, 18816000,
iast_GLOBAL (17.701 s) : 17701000, 17701000
. : milestone, 17701000,
profiling (15.067 s) : 15067000, 15067000
. : milestone, 15067000,
tracing (14.797 s) : 14797000, 14797000
. : milestone, 14797000,
section candidate
no_agent (15.426 s) : 15426000, 15426000
. : milestone, 15426000,
appsec (14.719 s) : 14719000, 14719000
. : milestone, 14719000,
iast (18.47 s) : 18470000, 18470000
. : milestone, 18470000,
iast_GLOBAL (17.922 s) : 17922000, 17922000
. : milestone, 17922000,
profiling (15.512 s) : 15512000, 15512000
. : milestone, 15512000,
tracing (14.74 s) : 14740000, 14740000
. : milestone, 14740000,
Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.62.0-SNAPSHOT~c716c8233c, baseline=1.62.0-SNAPSHOT~1b63a9dfca
dateFormat X
axisFormat %s
section baseline
no_agent (1.483 ms) : 1471, 1495
. : milestone, 1483,
appsec (3.805 ms) : 3584, 4026
. : milestone, 3805,
iast (2.268 ms) : 2198, 2337
. : milestone, 2268,
iast_GLOBAL (2.322 ms) : 2251, 2392
. : milestone, 2322,
profiling (2.098 ms) : 2043, 2153
. : milestone, 2098,
tracing (2.071 ms) : 2018, 2124
. : milestone, 2071,
section candidate
no_agent (1.484 ms) : 1472, 1496
. : milestone, 1484,
appsec (3.805 ms) : 3581, 4028
. : milestone, 3805,
iast (2.273 ms) : 2203, 2343
. : milestone, 2273,
iast_GLOBAL (2.314 ms) : 2244, 2385
. : milestone, 2314,
profiling (2.096 ms) : 2041, 2150
. : milestone, 2096,
tracing (2.068 ms) : 2014, 2121
. : milestone, 2068,
|
4e0646d to
21b2fc1
Compare
network.client.ip now shares the same activation logic as http.client_ip (DD_APPSEC_ENABLED or DD_TRACE_CLIENT_IP_ENABLED) and is no longer exclusive to AppSec events. Move it from GatewayBridge (where it was set only when security events fired) into HttpServerDecorator alongside http.client_ip, using the raw peer/socket IP. actor.ip remains in AppSec as a deprecated backward-compatibility tag.
21b2fc1 to
c716c82
Compare
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
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
network.client.ipnow shares the same activation logic ashttp.client_ip(DD_APPSEC_ENABLED=trueorDD_TRACE_CLIENT_IP_ENABLED=true) and is no longer exclusive to AppSec events. Moved it fromGatewayBridge(where it was set only when security events fired) intoHttpServerDecoratoralongsidehttp.client_ip, using the raw peer/socket IP.Main changes:
dd-java-agent/appsec/src/main/java/com/datadog/appsec/gateway/GatewayBridge.java(older, appsec-only tagging)dd-java-agent/agent-bootstrap/src/main/java/datadog/trace/bootstrap/instrumentation/decorator/HttpServerDecorator.java(new tagging)dd-java-agent/instrumentation-testing/src/main/groovy/datadog/trace/agent/test/base/HttpServerTest.groovyis the one needing the most attention.Motivation
Align with spec upgrades, in which
network.client.ipbecomes more broadly available, just ashttp.client_ip.Additional Notes
actor.ipremains in AppSec as a deprecated backward-compatibility tag. It does not make sense to broaden it's support and should be scheduled for removal eventually.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: [PROJ-IDENT]
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.