-
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
Create metric: appsec.waf.input_truncated #8375
base: master
Are you sure you want to change the base?
Conversation
final long objectTooDeep = | ||
wafMetrics.getWafInputsTruncatedCount(InputTruncatedType.OBJECT_TOO_DEEP); | ||
|
||
WafMetricCollector.get().wafInputTruncated(TruncatedType.STRING_TOO_LONG, stringTooLong); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't call these when the counters are 0. It'll try to increment the atomic counters by 0 and it's all pointless.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed to only add when is greater than 0
@@ -0,0 +1,22 @@ | |||
package datadog.trace.api.telemetry; | |||
|
|||
public enum TruncatedType { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed offline, this is pretty much redundant with InputTruncatedType
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The final decision has been the removal of InputTruncatedType
from libddwaf-java and keep this type in the dd-trace-java.
For reference this is the PR where the removal is done: DataDog/libddwaf-java#146
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 57 metrics, 6 unstable metrics. Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.47.0-SNAPSHOT~5a94e18fb2, baseline=1.47.0-SNAPSHOT~1c9548cf9b
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.041 s) : 0, 1041376
Total [baseline] (8.648 s) : 0, 8647964
Agent [candidate] (1.041 s) : 0, 1041323
Total [candidate] (8.676 s) : 0, 8675557
section iast
Agent [baseline] (1.17 s) : 0, 1170434
Total [baseline] (9.252 s) : 0, 9252005
Agent [candidate] (1.17 s) : 0, 1170331
Total [candidate] (9.193 s) : 0, 9192652
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.17 s) : 0, 1170481
Total [baseline] (9.238 s) : 0, 9238335
Agent [candidate] (1.18 s) : 0, 1179748
Total [candidate] (9.252 s) : 0, 9252210
section iast_TELEMETRY_OFF
Agent [baseline] (1.169 s) : 0, 1168766
Total [baseline] (9.269 s) : 0, 9269038
Agent [candidate] (1.175 s) : 0, 1175183
Total [candidate] (9.209 s) : 0, 9209105
gantt
title insecure-bank - break down per module: candidate=1.47.0-SNAPSHOT~5a94e18fb2, baseline=1.47.0-SNAPSHOT~1c9548cf9b
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (719.253 ms) : 0, 719253
BytebuddyAgent [candidate] (717.03 ms) : 0, 717030
GlobalTracer [baseline] (240.064 ms) : 0, 240064
GlobalTracer [candidate] (240.8 ms) : 0, 240800
AppSec [baseline] (55.49 ms) : 0, 55490
AppSec [candidate] (55.435 ms) : 0, 55435
Remote Config [baseline] (715.091 µs) : 0, 715
Remote Config [candidate] (713.568 µs) : 0, 714
Telemetry [baseline] (10.661 ms) : 0, 10661
Telemetry [candidate] (12.133 ms) : 0, 12133
section iast
BytebuddyAgent [baseline] (834.661 ms) : 0, 834661
BytebuddyAgent [candidate] (834.926 ms) : 0, 834926
GlobalTracer [baseline] (230.717 ms) : 0, 230717
GlobalTracer [candidate] (230.87 ms) : 0, 230870
AppSec [baseline] (57.516 ms) : 0, 57516
AppSec [candidate] (57.153 ms) : 0, 57153
Remote Config [baseline] (620.17 µs) : 0, 620
Remote Config [candidate] (617.016 µs) : 0, 617
Telemetry [baseline] (8.77 ms) : 0, 8770
Telemetry [candidate] (8.728 ms) : 0, 8728
IAST [baseline] (22.964 ms) : 0, 22964
IAST [candidate] (22.852 ms) : 0, 22852
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (835.079 ms) : 0, 835079
BytebuddyAgent [candidate] (843.137 ms) : 0, 843137
GlobalTracer [baseline] (231.293 ms) : 0, 231293
GlobalTracer [candidate] (232.295 ms) : 0, 232295
AppSec [baseline] (56.923 ms) : 0, 56923
AppSec [candidate] (56.906 ms) : 0, 56906
Remote Config [baseline] (616.853 µs) : 0, 617
Remote Config [candidate] (617.627 µs) : 0, 618
Telemetry [baseline] (8.663 ms) : 0, 8663
Telemetry [candidate] (8.685 ms) : 0, 8685
IAST [baseline] (22.657 ms) : 0, 22657
IAST [candidate] (22.753 ms) : 0, 22753
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (833.541 ms) : 0, 833541
BytebuddyAgent [candidate] (839.329 ms) : 0, 839329
GlobalTracer [baseline] (231.333 ms) : 0, 231333
GlobalTracer [candidate] (232.356 ms) : 0, 232356
AppSec [baseline] (55.445 ms) : 0, 55445
AppSec [candidate] (52.017 ms) : 0, 52017
Remote Config [baseline] (606.376 µs) : 0, 606
Remote Config [candidate] (605.81 µs) : 0, 606
Telemetry [baseline] (8.682 ms) : 0, 8682
Telemetry [candidate] (8.601 ms) : 0, 8601
IAST [baseline] (23.964 ms) : 0, 23964
IAST [candidate] (26.997 ms) : 0, 26997
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.47.0-SNAPSHOT~5a94e18fb2, baseline=1.47.0-SNAPSHOT~1c9548cf9b
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.04 s) : 0, 1040175
Total [baseline] (10.433 s) : 0, 10432936
Agent [candidate] (1.049 s) : 0, 1049287
Total [candidate] (10.425 s) : 0, 10424624
section appsec
Agent [baseline] (1.184 s) : 0, 1183911
Total [baseline] (10.746 s) : 0, 10746158
Agent [candidate] (1.183 s) : 0, 1182708
Total [candidate] (10.726 s) : 0, 10726080
section iast
Agent [baseline] (1.171 s) : 0, 1171073
Total [baseline] (10.956 s) : 0, 10955992
Agent [candidate] (1.173 s) : 0, 1172635
Total [candidate] (10.97 s) : 0, 10969632
section profiling
Agent [baseline] (1.27 s) : 0, 1269948
Total [baseline] (11.002 s) : 0, 11002099
Agent [candidate] (1.263 s) : 0, 1262670
Total [candidate] (10.821 s) : 0, 10821135
gantt
title petclinic - break down per module: candidate=1.47.0-SNAPSHOT~5a94e18fb2, baseline=1.47.0-SNAPSHOT~1c9548cf9b
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (715.948 ms) : 0, 715948
BytebuddyAgent [candidate] (721.746 ms) : 0, 721746
GlobalTracer [baseline] (240.654 ms) : 0, 240654
GlobalTracer [candidate] (242.571 ms) : 0, 242571
AppSec [baseline] (55.551 ms) : 0, 55551
AppSec [candidate] (56.049 ms) : 0, 56049
Remote Config [baseline] (719.43 µs) : 0, 719
Remote Config [candidate] (714.649 µs) : 0, 715
Telemetry [baseline] (12.138 ms) : 0, 12138
Telemetry [candidate] (12.929 ms) : 0, 12929
section appsec
BytebuddyAgent [baseline] (735.039 ms) : 0, 735039
BytebuddyAgent [candidate] (733.616 ms) : 0, 733616
GlobalTracer [baseline] (237.389 ms) : 0, 237389
GlobalTracer [candidate] (237.415 ms) : 0, 237415
AppSec [baseline] (176.596 ms) : 0, 176596
AppSec [candidate] (176.256 ms) : 0, 176256
Remote Config [baseline] (646.909 µs) : 0, 647
Remote Config [candidate] (664.813 µs) : 0, 665
Telemetry [baseline] (8.215 ms) : 0, 8215
Telemetry [candidate] (8.593 ms) : 0, 8593
IAST [baseline] (21.605 ms) : 0, 21605
IAST [candidate] (21.844 ms) : 0, 21844
section iast
BytebuddyAgent [baseline] (835.661 ms) : 0, 835661
BytebuddyAgent [candidate] (836.232 ms) : 0, 836232
GlobalTracer [baseline] (231.264 ms) : 0, 231264
GlobalTracer [candidate] (231.297 ms) : 0, 231297
AppSec [baseline] (56.856 ms) : 0, 56856
AppSec [candidate] (57.42 ms) : 0, 57420
Remote Config [baseline] (606.376 µs) : 0, 606
Remote Config [candidate] (627.842 µs) : 0, 628
Telemetry [baseline] (8.628 ms) : 0, 8628
Telemetry [candidate] (8.804 ms) : 0, 8804
IAST [baseline] (22.777 ms) : 0, 22777
IAST [candidate] (22.99 ms) : 0, 22990
section profiling
ProfilingAgent [baseline] (96.126 ms) : 0, 96126
ProfilingAgent [candidate] (96.379 ms) : 0, 96379
BytebuddyAgent [baseline] (712.835 ms) : 0, 712835
BytebuddyAgent [candidate] (707.959 ms) : 0, 707959
GlobalTracer [baseline] (353.189 ms) : 0, 353189
GlobalTracer [candidate] (351.812 ms) : 0, 351812
AppSec [baseline] (55.534 ms) : 0, 55534
AppSec [candidate] (54.659 ms) : 0, 54659
Remote Config [baseline] (708.079 µs) : 0, 708
Remote Config [candidate] (702.892 µs) : 0, 703
Telemetry [baseline] (8.976 ms) : 0, 8976
Telemetry [candidate] (8.926 ms) : 0, 8926
Profiling [baseline] (96.153 ms) : 0, 96153
Profiling [candidate] (96.407 ms) : 0, 96407
LoadParameters
See matching parameters
SummaryFound 1 performance improvements and 0 performance regressions! Performance is the same for 11 metrics, 16 unstable metrics.
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.47.0-SNAPSHOT~5a94e18fb2, baseline=1.47.0-SNAPSHOT~3fd5db0dc1
dateFormat X
axisFormat %s
section baseline
no_agent (1.347 ms) : 1328, 1366
. : milestone, 1347,
appsec (1.747 ms) : 1724, 1770
. : milestone, 1747,
appsec_no_iast (1.769 ms) : 1744, 1794
. : milestone, 1769,
iast (1.513 ms) : 1489, 1538
. : milestone, 1513,
profiling (1.577 ms) : 1552, 1602
. : milestone, 1577,
tracing (1.485 ms) : 1460, 1510
. : milestone, 1485,
section candidate
no_agent (1.36 ms) : 1340, 1379
. : milestone, 1360,
appsec (1.716 ms) : 1692, 1740
. : milestone, 1716,
appsec_no_iast (1.735 ms) : 1710, 1759
. : milestone, 1735,
iast (1.485 ms) : 1460, 1510
. : milestone, 1485,
profiling (1.508 ms) : 1484, 1531
. : milestone, 1508,
tracing (1.478 ms) : 1452, 1504
. : milestone, 1478,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.47.0-SNAPSHOT~5a94e18fb2, baseline=1.47.0-SNAPSHOT~3fd5db0dc1
dateFormat X
axisFormat %s
section baseline
no_agent (378.563 µs) : 358, 399
. : milestone, 379,
iast (504.551 µs) : 482, 527
. : milestone, 505,
iast_FULL (733.817 µs) : 712, 756
. : milestone, 734,
iast_GLOBAL (547.129 µs) : 525, 569
. : milestone, 547,
iast_HARDCODED_SECRET_DISABLED (513.155 µs) : 491, 536
. : milestone, 513,
iast_INACTIVE (463.099 µs) : 441, 485
. : milestone, 463,
iast_TELEMETRY_OFF (494.417 µs) : 471, 518
. : milestone, 494,
tracing (453.259 µs) : 432, 474
. : milestone, 453,
section candidate
no_agent (383.784 µs) : 364, 403
. : milestone, 384,
iast (506.772 µs) : 485, 529
. : milestone, 507,
iast_FULL (744.69 µs) : 723, 767
. : milestone, 745,
iast_GLOBAL (549.099 µs) : 527, 571
. : milestone, 549,
iast_HARDCODED_SECRET_DISABLED (511.051 µs) : 489, 533
. : milestone, 511,
iast_INACTIVE (457.638 µs) : 436, 479
. : milestone, 458,
iast_TELEMETRY_OFF (494.434 µs) : 473, 516
. : milestone, 494,
tracing (451.86 µs) : 431, 473
. : milestone, 452,
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 tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.47.0-SNAPSHOT~5a94e18fb2, baseline=1.47.0-SNAPSHOT~1c9548cf9b
dateFormat X
axisFormat %s
section baseline
no_agent (1.476 ms) : 1464, 1487
. : milestone, 1476,
appsec (2.369 ms) : 2325, 2412
. : milestone, 2369,
iast (2.119 ms) : 2063, 2174
. : milestone, 2119,
iast_GLOBAL (2.154 ms) : 2099, 2210
. : milestone, 2154,
profiling (2.459 ms) : 2280, 2639
. : milestone, 2459,
tracing (1.953 ms) : 1910, 1995
. : milestone, 1953,
section candidate
no_agent (1.477 ms) : 1466, 1489
. : milestone, 1477,
appsec (2.337 ms) : 2294, 2381
. : milestone, 2337,
iast (2.113 ms) : 2057, 2168
. : milestone, 2113,
iast_GLOBAL (2.152 ms) : 2096, 2207
. : milestone, 2152,
profiling (1.981 ms) : 1937, 2026
. : milestone, 1981,
tracing (1.943 ms) : 1901, 1985
. : milestone, 1943,
Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.47.0-SNAPSHOT~5a94e18fb2, baseline=1.47.0-SNAPSHOT~1c9548cf9b
dateFormat X
axisFormat %s
section baseline
no_agent (15.546 s) : 15546000, 15546000
. : milestone, 15546000,
appsec (14.923 s) : 14923000, 14923000
. : milestone, 14923000,
iast (18.753 s) : 18753000, 18753000
. : milestone, 18753000,
iast_GLOBAL (18.269 s) : 18269000, 18269000
. : milestone, 18269000,
profiling (15.708 s) : 15708000, 15708000
. : milestone, 15708000,
tracing (14.802 s) : 14802000, 14802000
. : milestone, 14802000,
section candidate
no_agent (14.832 s) : 14832000, 14832000
. : milestone, 14832000,
appsec (15.21 s) : 15210000, 15210000
. : milestone, 15210000,
iast (18.566 s) : 18566000, 18566000
. : milestone, 18566000,
iast_GLOBAL (17.696 s) : 17696000, 17696000
. : milestone, 17696000,
profiling (14.98 s) : 14980000, 14980000
. : milestone, 14980000,
tracing (15.01 s) : 15010000, 15010000
. : milestone, 15010000,
|
What Does This Do
This adds a new value to some metrics which is necessary for the consolidation of ASM Span Tags, Metrics, and Logs across all supported languages. The newly value will be implemented in the following metrics:
Motivation
Our goal is to implement all the missing ASM Span Tags, Metrics, and Logs.
Additional Notes
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: APPSEC-56479