Skip to content
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

[ASM] Send header values as string to the WAF #6116

Closed

Conversation

NachoEchevarria
Copy link
Contributor

@NachoEchevarria NachoEchevarria commented Oct 4, 2024

Summary of changes

Util this PR, we woudl store the request headers in a array of strings and we would send that array to the WAF. When generating fingerprints, the WAF does not accept arrays of strings but a single string, so, when we have a single header value, we store it in a string instead of in an array of strings with a single value inside the array.

This change has fixed some problems related to the fingerprint generation, which has derived in a large amount of updated snapshots.

Reason for change

Implementation details

Test coverage

Other details

Copy link
Contributor

github-actions bot commented Oct 4, 2024

Snapshots difference summary

The following differences have been observed in committed snapshots. It is meant to help the reviewer.
The diff is simplistic, so please check some files anyway while we improve it.

81 occurrences of :

-      _dd.appsec.fp.http.header: hdr-0000000000--1-4740ae63,
-      _dd.appsec.fp.http.network: net-0-1000000000,
+      _dd.appsec.fp.http.header: hdr-0000000000-3626b5f8-1-4740ae63,
+      _dd.appsec.fp.http.network: net-1-1000000000,

6 occurrences of :

-      _dd.appsec.fp.http.header: hdr-0100000001--3-bf93958a,
-      _dd.appsec.fp.http.network: net-0-1000000000,
+      _dd.appsec.fp.http.header: hdr-0100000001-3626b5f8-3-bf93958a,
+      _dd.appsec.fp.http.network: net-1-1000000000,

17 occurrences of :

-      _dd.appsec.fp.http.header: hdr-0100000100--2-da57b738,
-      _dd.appsec.fp.http.network: net-0-1000000000,
+      _dd.appsec.fp.http.header: hdr-0100000100-3626b5f8-2-da57b738,
+      _dd.appsec.fp.http.network: net-1-1000000000,

14 occurrences of :

-      _dd.appsec.fp.http.header: hdr-0000000001--3-bf93958a,
-      _dd.appsec.fp.http.network: net-0-1000000000,
+      _dd.appsec.fp.http.header: hdr-0000000001-3626b5f8-3-bf93958a,
+      _dd.appsec.fp.http.network: net-1-1000000000,

17 occurrences of :

-      _dd.appsec.fp.http.header: hdr-0000000100--2-da57b738,
-      _dd.appsec.fp.http.network: net-0-1000000000,
+      _dd.appsec.fp.http.header: hdr-0000000100-3626b5f8-2-da57b738,
+      _dd.appsec.fp.http.network: net-1-1000000000,

26 occurrences of :

-      _dd.appsec.fp.http.header: hdr-0000000100--3-4d739311,
-      _dd.appsec.fp.http.network: net-0-1000000000,
+      _dd.appsec.fp.http.header: hdr-0000000100-3626b5f8-3-4d739311,
+      _dd.appsec.fp.http.network: net-1-1000000000,

8 occurrences of :

-      _dd.appsec.fp.http.header: hdr-0000000001--5-6cdcf2fe,
-      _dd.appsec.fp.http.network: net-0-1000000000,
+      _dd.appsec.fp.http.header: hdr-0000000001-3626b5f8-5-6cdcf2fe,
+      _dd.appsec.fp.http.network: net-1-1000000000,

25 occurrences of :

-      _dd.appsec.fp.http.header: hdr-0000000100--5-07490af2,
-      _dd.appsec.fp.http.network: net-0-1000000000,
+      _dd.appsec.fp.http.header: hdr-0000000100-3626b5f8-5-07490af2,
+      _dd.appsec.fp.http.network: net-1-1000000000,

1 occurrences of :

-      _dd.appsec.s.req.headers: [{"connection":[[[8]],{"len":1}],"content-length":[[[8]],{"len":1}],"content-type":[[[8]],{"len":1}],"host":[[[8]],{"len":1}],"user-agent":[[[8]],{"len":1}],"x-forwarded-for":[[[8]],{"len":1}]}],
+      _dd.appsec.s.req.headers: [{"connection":[8],"content-length":[8],"content-type":[8],"host":[8],"user-agent":[8],"x-forwarded-for":[8]}],

1 occurrences of :

-      _dd.appsec.s.req.headers: [{"connection":[[[8]],{"len":1}],"content-length":[[[8]],{"len":1}],"content-type":[[[8]],{"len":1}],"host":[[[8]],{"len":1}],"user-agent":[[[8]],{"len":1}],"x-forwarded-for":[[[8]],{"len":1}]}],
-      _dd.appsec.s.res.headers: [{"content-type":[[[8]],{"len":1}]}],
+      _dd.appsec.s.req.headers: [{"connection":[8],"content-length":[8],"content-type":[8],"host":[8],"user-agent":[8],"x-forwarded-for":[8]}],
+      _dd.appsec.s.res.headers: [{"content-type":[8]}],

1 occurrences of :

-      _dd.appsec.s.req.headers: [{"connection":[[[8]],{"len":1}],"content-length":[[[8]],{"len":1}],"content-type":[[[8]],{"len":1}],"host":[[[8]],{"len":1}],"user-agent":[[[8]],{"len":1}],"x-forwarded-for":[[[8]],{"len":1}]}],
+      _dd.appsec.s.req.headers: [{"connection":[8],"content-length":[8],"content-type":[8],"host":[8],"user-agent":[8],"x-forwarded-for":[8]}],
[...]
-      _dd.appsec.s.res.headers: [{"content-type":[[[8]],{"len":1}]}],
+      _dd.appsec.s.res.headers: [{"content-type":[8]}],

1 occurrences of :

-      _dd.appsec.s.req.headers: [{"content-length":[[[8]],{"len":1}],"content-type":[[[8]],{"len":1}],"host":[[[8]],{"len":1}],"user-agent":[[[8]],{"len":1}],"x-forwarded-for":[[[8]],{"len":1}]}],
+      _dd.appsec.s.req.headers: [{"content-length":[8],"content-type":[8],"host":[8],"user-agent":[8],"x-forwarded-for":[8]}],

2 occurrences of :

-      _dd.appsec.s.req.headers: [{"content-length":[[[8]],{"len":1}],"content-type":[[[8]],{"len":1}],"host":[[[8]],{"len":1}],"user-agent":[[[8]],{"len":1}],"x-forwarded-for":[[[8]],{"len":1}]}],
+      _dd.appsec.s.req.headers: [{"content-length":[8],"content-type":[8],"host":[8],"user-agent":[8],"x-forwarded-for":[8]}],
[...]
-      _dd.appsec.s.res.headers: [{"content-type":[[[8]],{"len":1}]}],
+      _dd.appsec.s.res.headers: [{"content-type":[8]}],

5 occurrences of :

-      _dd.appsec.fp.http.header: hdr-0100000000--1-4740ae63,
-      _dd.appsec.fp.http.network: net-0-1000000000,
-      _dd.appsec.json: {"triggers":[{"rule":{"id":"ublock","name":"Hello","tags":{"category":"attack_attempt","type":"security_scanner"}},"rule_matches":[{"operator":"match_regex","operator_value":"hello","parameters":[{"address":"server.request.headers.no_cookies","highlight":["hello"],"key_path":["user-agent","0"],"value":"mistake not... hello/v"}]}]}]},
+      _dd.appsec.fp.http.header: hdr-0100000000-197358b8-1-4740ae63,
+      _dd.appsec.fp.http.network: net-1-1000000000,
+      _dd.appsec.json: {"triggers":[{"rule":{"id":"ublock","name":"Hello","tags":{"category":"attack_attempt","type":"security_scanner"}},"rule_matches":[{"operator":"match_regex","operator_value":"hello","parameters":[{"address":"server.request.headers.no_cookies","highlight":["hello"],"key_path":["user-agent"],"value":"mistake not... hello/v"}]}]}]},

20 occurrences of :

-      _dd.appsec.fp.http.network: net-0-1000000000,
+      _dd.appsec.fp.http.network: <NetworkPrint>,

15 occurrences of :

-      _dd.appsec.fp.http.network: net-0-1000000000,
-      _dd.appsec.json: {"triggers":[{"rule":{"id":"tst-037-009","name":"Test block on response header","tags":{"category":"attack_attempt","type":"lfi"}},"rule_matches":[{"operator":"match_regex","operator_value":"en-us|krypton","parameters":[{"address":"server.response.headers.no_cookies","highlight":["krypton"],"key_path":["content-language","0"],"value":"krypton"}]}]}]},
+      _dd.appsec.fp.http.network: <NetworkPrint>,
+      _dd.appsec.json: {"triggers":[{"rule":{"id":"tst-037-009","name":"Test block on response header","tags":{"category":"attack_attempt","type":"lfi"}},"rule_matches":[{"operator":"match_regex","operator_value":"en-us|krypton","parameters":[{"address":"server.response.headers.no_cookies","highlight":["krypton"],"key_path":["content-language"],"value":"krypton"}]}]}]},

1 occurrences of :

-      _dd.appsec.fp.http.header: hdr-0000000010--1-4740ae63,
-      _dd.appsec.fp.http.network: net-0-1000000000,
+      _dd.appsec.fp.http.header: hdr-0000000010-3626b5f8-1-4740ae63,
+      _dd.appsec.fp.http.network: net-1-1000000000,

20 occurrences of :

-      _dd.appsec.fp.http.header: hdr-0000000000--1-4740ae63,
-      _dd.appsec.fp.http.network: net-0-1000000000,
-      _dd.appsec.json: {"triggers":[{"rule":{"id":"ublock","name":"Hello","tags":{"category":"attack_attempt","type":"security_scanner"}},"rule_matches":[{"operator":"match_regex","operator_value":"hello","parameters":[{"address":"server.request.headers.no_cookies","highlight":["hello"],"key_path":["user-agent","0"],"value":"mistake not... hello/v"}]}]}]},
+      _dd.appsec.fp.http.header: hdr-0000000000-197358b8-1-4740ae63,
+      _dd.appsec.fp.http.network: net-1-1000000000,
+      _dd.appsec.json: {"triggers":[{"rule":{"id":"ublock","name":"Hello","tags":{"category":"attack_attempt","type":"security_scanner"}},"rule_matches":[{"operator":"match_regex","operator_value":"hello","parameters":[{"address":"server.request.headers.no_cookies","highlight":["hello"],"key_path":["user-agent"],"value":"mistake not... hello/v"}]}]}]},

1 occurrences of :

-      _dd.appsec.json: {"triggers":[{"rule":{"id":"new-test-non-blocking","name":"Datadog test scanner - NON blocking version: user-agent","tags":{"category":"attack_attempt","type":"attack_tool"}},"rule_matches":[{"operator":"match_regex","operator_value":"^dd-test-scanner-log-block(?:$|/|\\s)","parameters":[{"address":"server.request.headers.no_cookies","highlight":["dd-test-scanner-log-block"],"key_path":["user-agent","0"],"value":"dd-test-scanner-log-block"}]}]}]},
+      _dd.appsec.json: {"triggers":[{"rule":{"id":"new-test-non-blocking","name":"Datadog test scanner - NON blocking version: user-agent","tags":{"category":"attack_attempt","type":"attack_tool"}},"rule_matches":[{"operator":"match_regex","operator_value":"^dd-test-scanner-log-block(?:$|/|\\s)","parameters":[{"address":"server.request.headers.no_cookies","highlight":["dd-test-scanner-log-block"],"key_path":["user-agent"],"value":"dd-test-scanner-log-block"}]}]}]},

2 occurrences of :

-      _dd.appsec.json: {"triggers":[{"rule":{"id":"ua0-600-56x","name":"Datadog test scanner - blocking version: user-agent","tags":{"category":"attack_attempt","type":"attack_tool"}},"rule_matches":[{"operator":"match_regex","operator_value":"^dd-test-scanner-log-block(?:$|/|\\s)","parameters":[{"address":"server.request.headers.no_cookies","highlight":["dd-test-scanner-log-block"],"key_path":["user-agent","0"],"value":"dd-test-scanner-log-block"}]}]}]},
+      _dd.appsec.json: {"triggers":[{"rule":{"id":"ua0-600-56x","name":"Datadog test scanner - blocking version: user-agent","tags":{"category":"attack_attempt","type":"attack_tool"}},"rule_matches":[{"operator":"match_regex","operator_value":"^dd-test-scanner-log-block(?:$|/|\\s)","parameters":[{"address":"server.request.headers.no_cookies","highlight":["dd-test-scanner-log-block"],"key_path":["user-agent"],"value":"dd-test-scanner-log-block"}]}]}]},

3 occurrences of :

-      _dd.appsec.s.req.headers: [{"content-length":[[[8]],{"len":1}],"content-type":[[[8]],{"len":1}],"expect":[[[8]],{"len":1}],"host":[[[8]],{"len":1}],"traceparent":[[[8]],{"len":1}],"tracestate":[[[8]],{"len":1}],"user-agent":[[[8]],{"len":1}],"x-datadog-parent-id":[[[8]],{"len":1}],"x-datadog-sampling-priority":[[[8]],{"len":1}],"x-datadog-tags":[[[8]],{"len":1}],"x-datadog-trace-id":[[[8]],{"len":1}],"x-forwarded-for":[[[8]],{"len":1}]}],
+      _dd.appsec.s.req.headers: [{"content-length":[8],"content-type":[8],"expect":[8],"host":[8],"traceparent":[8],"tracestate":[8],"user-agent":[8],"x-datadog-parent-id":[8],"x-datadog-sampling-priority":[8],"x-datadog-tags":[8],"x-datadog-trace-id":[8],"x-forwarded-for":[8]}],
[...]
-      _dd.appsec.s.res.headers: [{"cache-control":[[[8]],{"len":1}],"content-length":[[[8]],{"len":1}],"content-type":[[[8]],{"len":1}],"expires":[[[8]],{"len":1}],"pragma":[[[8]],{"len":1}],"server":[[[8]],{"len":1}],"x-aspnet-version":[[[8]],{"len":1}]}],
+      _dd.appsec.s.res.headers: [{"cache-control":[8],"content-length":[8],"content-type":[8],"expires":[8],"pragma":[8],"server":[8],"x-aspnet-version":[8]}],

1 occurrences of :

-      _dd.appsec.fp.http.header: hdr-0100000100--3-4d739311,
-      _dd.appsec.fp.http.network: net-0-1000000000,
+      _dd.appsec.fp.http.header: hdr-0100000100-3626b5f8-3-4d739311,
+      _dd.appsec.fp.http.network: net-1-1000000000,

15 occurrences of :

-      _dd.appsec.fp.http.header: hdr-0000000000--3-98425651,
-      _dd.appsec.fp.http.network: net-0-1000000000,
-      _dd.appsec.json: {"triggers":[{"rule":{"id":"ublock","name":"Hello","tags":{"category":"attack_attempt","type":"security_scanner"}},"rule_matches":[{"operator":"match_regex","operator_value":"hello","parameters":[{"address":"server.request.headers.no_cookies","highlight":["hello"],"key_path":["user-agent","0"],"value":"mistake not... hello/v"}]}]}]},
+      _dd.appsec.fp.http.header: hdr-0000000000-197358b8-3-98425651,
+      _dd.appsec.fp.http.network: net-1-1000000000,
+      _dd.appsec.json: {"triggers":[{"rule":{"id":"ublock","name":"Hello","tags":{"category":"attack_attempt","type":"security_scanner"}},"rule_matches":[{"operator":"match_regex","operator_value":"hello","parameters":[{"address":"server.request.headers.no_cookies","highlight":["hello"],"key_path":["user-agent"],"value":"mistake not... hello/v"}]}]}]},

54 occurrences of :

-      _dd.appsec.fp.http.header: hdr-0000000000--3-98425651,
-      _dd.appsec.fp.http.network: net-0-1000000000,
+      _dd.appsec.fp.http.header: hdr-0000000000-3626b5f8-3-98425651,
+      _dd.appsec.fp.http.network: net-1-1000000000,

2 occurrences of :

-      _dd.appsec.fp.http.header: hdr-0100000100--5-07490af2,
-      _dd.appsec.fp.http.network: net-0-1000000000,
+      _dd.appsec.fp.http.header: hdr-0100000100-3626b5f8-5-07490af2,
+      _dd.appsec.fp.http.network: net-1-1000000000,

5 occurrences of :

-      _dd.appsec.fp.http.header: hdr-0000000000--3-98425651,
-      _dd.appsec.fp.http.network: net-0-1000000000,
-      _dd.appsec.json: {"triggers":[{"rule":{"id":"tst-037-009","name":"Test block on response header","tags":{"category":"attack_attempt","type":"lfi"}},"rule_matches":[{"operator":"match_regex","operator_value":"en-us|krypton","parameters":[{"address":"server.response.headers.no_cookies","highlight":["krypton"],"key_path":["content-language","0"],"value":"krypton"}]}]}]},
+      _dd.appsec.fp.http.header: hdr-0000000000-3626b5f8-3-98425651,
+      _dd.appsec.fp.http.network: net-1-1000000000,
+      _dd.appsec.json: {"triggers":[{"rule":{"id":"tst-037-009","name":"Test block on response header","tags":{"category":"attack_attempt","type":"lfi"}},"rule_matches":[{"operator":"match_regex","operator_value":"en-us|krypton","parameters":[{"address":"server.response.headers.no_cookies","highlight":["krypton"],"key_path":["content-language"],"value":"krypton"}]}]}]},

2 occurrences of :

-      _dd.appsec.s.req.headers: [{"content-length":[[[8]],{"len":1}],"content-type":[[[8]],{"len":1}],"expect":[[[8]],{"len":1}],"host":[[[8]],{"len":1}],"traceparent":[[[8]],{"len":1}],"tracestate":[[[8]],{"len":1}],"user-agent":[[[8]],{"len":1}],"x-datadog-parent-id":[[[8]],{"len":1}],"x-datadog-sampling-priority":[[[8]],{"len":1}],"x-datadog-tags":[[[8]],{"len":1}],"x-datadog-trace-id":[[[8]],{"len":1}],"x-forwarded-for":[[[8]],{"len":1}]}],
+      _dd.appsec.s.req.headers: [{"content-length":[8],"content-type":[8],"expect":[8],"host":[8],"traceparent":[8],"tracestate":[8],"user-agent":[8],"x-datadog-parent-id":[8],"x-datadog-sampling-priority":[8],"x-datadog-tags":[8],"x-datadog-trace-id":[8],"x-forwarded-for":[8]}],
[...]
-      _dd.appsec.s.res.headers: [{"cache-control":[[[8]],{"len":1}],"content-type":[[[8]],{"len":1}],"server":[[[8]],{"len":1}],"x-aspnetmvc-version":[[[8]],{"len":1}],"x-aspnet-version":[[[8]],{"len":1}]}],
+      _dd.appsec.s.res.headers: [{"cache-control":[8],"content-type":[8],"server":[8],"x-aspnetmvc-version":[8],"x-aspnet-version":[8]}],

1 occurrences of :

-      _dd.appsec.s.req.headers: [{"content-length":[[[8]],{"len":1}],"content-type":[[[8]],{"len":1}],"expect":[[[8]],{"len":1}],"host":[[[8]],{"len":1}],"traceparent":[[[8]],{"len":1}],"tracestate":[[[8]],{"len":1}],"user-agent":[[[8]],{"len":1}],"x-datadog-parent-id":[[[8]],{"len":1}],"x-datadog-sampling-priority":[[[8]],{"len":1}],"x-datadog-tags":[[[8]],{"len":1}],"x-datadog-trace-id":[[[8]],{"len":1}],"x-forwarded-for":[[[8]],{"len":1}]}],
+      _dd.appsec.s.req.headers: [{"content-length":[8],"content-type":[8],"expect":[8],"host":[8],"traceparent":[8],"tracestate":[8],"user-agent":[8],"x-datadog-parent-id":[8],"x-datadog-sampling-priority":[8],"x-datadog-tags":[8],"x-datadog-trace-id":[8],"x-forwarded-for":[8]}],
[...]
-      _dd.appsec.s.res.headers: [{"cache-control":[[[8]],{"len":1}],"content-type":[[[8]],{"len":1}],"x-aspnet-version":[[[8]],{"len":1}]}],
+      _dd.appsec.s.res.headers: [{"cache-control":[8],"content-type":[8],"x-aspnet-version":[8]}],

3 occurrences of :

-      _dd.appsec.fp.http.header: hdr-0100000000--1-4740ae63,
-      _dd.appsec.fp.http.network: net-0-1000000000,
+      _dd.appsec.fp.http.header: hdr-0100000000-3626b5f8-1-4740ae63,
+      _dd.appsec.fp.http.network: net-1-1000000000,

2 occurrences of :

-      _dd.appsec.fp.http.header: hdr-0100000000--3-98425651,
-      _dd.appsec.fp.http.network: net-0-1000000000,
+      _dd.appsec.fp.http.header: hdr-0100000000-3626b5f8-3-98425651,
+      _dd.appsec.fp.http.network: net-1-1000000000,

6 occurrences of :

-      _dd.appsec.json: {"triggers":[{"rule":{"id":"ua0-600-16x","name":"SQL power injector","tags":{"category":"attack_attempt","type":"attack_tool"}},"rule_matches":[{"operator":"match_regex","operator_value":"sql power injector","parameters":[{"address":"server.request.headers.no_cookies","highlight":["sql power injector"],"key_path":["user-agent","0"],"value":"Mistake Not... (sql power injector)"}]}]}]},
+      _dd.appsec.json: {"triggers":[{"rule":{"id":"ua0-600-16x","name":"SQL power injector","tags":{"category":"attack_attempt","type":"attack_tool"}},"rule_matches":[{"operator":"match_regex","operator_value":"sql power injector","parameters":[{"address":"server.request.headers.no_cookies","highlight":["sql power injector"],"key_path":["user-agent"],"value":"Mistake Not... (sql power injector)"}]}]}]},

3 occurrences of :

-      _dd.appsec.json: {"triggers":[{"rule":{"id":"crs-913-110","name":"Acunetix","tags":{"category":"attack_attempt","type":"commercial_scanner"}},"rule_matches":[{"operator":"phrase_match","operator_value":"","parameters":[{"address":"server.request.headers.no_cookies","highlight":["acunetix-product"],"key_path":["user-agent","0"],"value":"mistake not... acunetix-product"}]}]}]},
+      _dd.appsec.json: {"triggers":[{"rule":{"id":"crs-913-110","name":"Acunetix","tags":{"category":"attack_attempt","type":"commercial_scanner"}},"rule_matches":[{"operator":"phrase_match","operator_value":"","parameters":[{"address":"server.request.headers.no_cookies","highlight":["acunetix-product"],"key_path":["user-agent"],"value":"mistake not... acunetix-product"}]}]}]},

@andrewlock
Copy link
Member

andrewlock commented Oct 4, 2024

Execution-Time Benchmarks Report ⏱️

Execution-time results for samples comparing the following branches/commits:

Execution-time benchmarks measure the whole time it takes to execute a program. And are intended to measure the one-off costs. Cases where the execution time results for the PR are worse than latest master results are shown in red. The following thresholds were used for comparing the execution times:

  • Welch test with statistical test for significance of 5%
  • Only results indicating a difference greater than 5% and 5 ms are considered.

Note that these results are based on a single point-in-time result for each branch. For full results, see the dashboard.

Graphs show the p99 interval based on the mean and StdDev of the test run, as well as the mean value of the run (shown as a diamond below the graph).

gantt
    title Execution time (ms) FakeDbCommand (.NET Framework 4.6.2) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6116) - mean (70ms)  : 66, 74
     .   : milestone, 70,
    master - mean (70ms)  : 67, 72
     .   : milestone, 70,

    section CallTarget+Inlining+NGEN
    This PR (6116) - mean (1,113ms)  : 1090, 1137
     .   : milestone, 1113,
    master - mean (1,107ms)  : 1085, 1130
     .   : milestone, 1107,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6116) - mean (108ms)  : 105, 112
     .   : milestone, 108,
    master - mean (109ms)  : 106, 111
     .   : milestone, 109,

    section CallTarget+Inlining+NGEN
    This PR (6116) - mean (771ms)  : 755, 786
     .   : milestone, 771,
    master - mean (769ms)  : 751, 787
     .   : milestone, 769,

Loading
gantt
    title Execution time (ms) FakeDbCommand (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6116) - mean (92ms)  : 89, 95
     .   : milestone, 92,
    master - mean (91ms)  : 89, 94
     .   : milestone, 91,

    section CallTarget+Inlining+NGEN
    This PR (6116) - mean (728ms)  : 714, 742
     .   : milestone, 728,
    master - mean (726ms)  : 712, 740
     .   : milestone, 726,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Framework 4.6.2) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6116) - mean (189ms)  : 186, 193
     .   : milestone, 189,
    master - mean (189ms)  : 186, 191
     .   : milestone, 189,

    section CallTarget+Inlining+NGEN
    This PR (6116) - mean (1,201ms)  : 1172, 1229
     .   : milestone, 1201,
    master - mean (1,195ms)  : 1171, 1219
     .   : milestone, 1195,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET Core 3.1) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6116) - mean (275ms)  : 271, 278
     .   : milestone, 275,
    master - mean (274ms)  : 268, 279
     .   : milestone, 274,

    section CallTarget+Inlining+NGEN
    This PR (6116) - mean (944ms)  : 926, 961
     .   : milestone, 944,
    master - mean (944ms)  : 929, 958
     .   : milestone, 944,

Loading
gantt
    title Execution time (ms) HttpMessageHandler (.NET 6) 
    dateFormat  X
    axisFormat %s
    todayMarker off
    section Baseline
    This PR (6116) - mean (263ms)  : 260, 267
     .   : milestone, 263,
    master - mean (262ms)  : 258, 266
     .   : milestone, 262,

    section CallTarget+Inlining+NGEN
    This PR (6116) - mean (926ms)  : 910, 943
     .   : milestone, 926,
    master - mean (925ms)  : 903, 947
     .   : milestone, 925,

Loading

@NachoEchevarria NachoEchevarria changed the title Nacho/send user agent header as string to the waf [ASM] Send user agent header as string to the waf Oct 4, 2024
@datadog-ddstaging
Copy link

datadog-ddstaging bot commented Oct 4, 2024

Datadog Report

Branch report: nacho/SendUserAgentHeaderAsStringToTheWAF
Commit report: 57fd4ae
Test service: dd-trace-dotnet

❌ 2 Failed (1 Known Flaky), 470989 Passed, 3292 Skipped, 29h 42m 45.1s Total Time

❌ Failed Tests (2)

  • HttpClient_SubmitsTraces - Datadog.Trace.ClrProfiler.IntegrationTests.HttpMessageHandlerTests - Details

    Expand for error
     
     Expected var integration = latestIntegrations {empty} to contain key "CurlHandler".), but no such item was found.t found False.
    
  • WorkingWithContinuousProfiler - Datadog.Trace.Tools.dd_dotnet.ArtifactTests.Checks.ProcessBasicChecksTests - ❄️ Known flaky - Details

    Expand for error
     
     
     With StandardOutput:
     Running checks on process 1220 Process name: Samples.Console  ---- STARTING TRACER SETUP CHECKS ----- Target process is running with .NET Framework 1. Checking Modules Needed so the Tracer Loads:  [SUCCESS]: The native library version 3.4.0.0 is loaded into the process.  [WARNING]: Found multiple instances of Datadog.Trace.dll in the target process. Detected versions: 3.4.0.0  2. Checking DD_DOTNET_TRACER_HOME and related configuration value:  [SUCCESS]: DD_DOTNET_TRACER_HOME is set to 'D:\a\1\s\shared\bin\monitoring-home' and the directory was found correctly. 3. Checking COR_PROFILER_PATH and related configuration value:  [SUCCESS]: The environment variable COR_PROFILER_PATH is set to the correct value of D:\a\1\s\shared\bin\monitoring-home\win-x64\Datadog.Trace.ClrProfiler.Native.dll . 4. Checking COR_PROFILER and related configuration value:  [SUCCESS]: The environment variable COR_PROFILER is set to the correct value of {846F5F1C-F9AE-4B07-969E-05C26BC060D8}. 5. Checking COR_ENABLE_PROFILING and related configuration value:  [SUCCESS]: The environment variable COR_ENABLE_PROFILING is set to the correct value of 1.  ---- CONFIGURATION CHECKS ----- 1. Checking if tracing is disabled using DD_TRACE_ENABLED.  [INFO]: DD_TRACE_ENABLED is not set, the default value is true. 2. Checking if profiling is enabled using DD_PROFILING_ENABLED.  [INFO]: DD_PROFILING_ENABLED is set to 'auto'. The continuous profiler is enabled and may begin profiling based on heuristics.  ---- DATADOG AGENT CHECKS ----- Detected agent url: http://127.0.0.1:52612/. Note: this url may be incorrect if you configured the application through a configuration file. Connecting to Agent at endpoint http://127.0.0.1:52612/ using HTTP  [WARNING]: Could not detect the agent version. It may be running with a version older than 7.27.0.  [SUCCESS]: No issue found with the target process. 
     With ErrorOutput:
     
     With ExitCode:
     0acer version 3.4.0.0 is loaded into the process."}.
    

@andrewlock
Copy link
Member

andrewlock commented Oct 4, 2024

Benchmarks Report for appsec 🐌

Benchmarks for #6116 compared to master:

  • All benchmarks have the same speed
  • 1 benchmarks have fewer allocations

The following thresholds were used for comparing the benchmark speeds:

  • Mann–Whitney U test with statistical test for significance of 5%
  • Only results indicating a difference greater than 10% and 0.3 ns are considered.

Allocation changes below 0.5% are ignored.

Benchmark details

Benchmarks.Trace.Asm.AppSecBodyBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master AllCycleSimpleBody net6.0 72.8μs 122ns 471ns 0.0728 0 0 6.01 KB
master AllCycleSimpleBody netcoreapp3.1 62.8μs 96.1ns 372ns 0.0938 0 0 6.95 KB
master AllCycleSimpleBody net472 47.9μs 77.6ns 280ns 1.31 0 0 8.34 KB
master AllCycleMoreComplexBody net6.0 78.7μs 102ns 393ns 0.119 0 0 9.51 KB
master AllCycleMoreComplexBody netcoreapp3.1 69.6μs 100ns 389ns 0.139 0 0 10.37 KB
master AllCycleMoreComplexBody net472 54.4μs 55.5ns 208ns 1.86 0.0274 0 11.85 KB
master ObjectExtractorSimpleBody net6.0 143ns 0.182ns 0.705ns 0.00395 0 0 280 B
master ObjectExtractorSimpleBody netcoreapp3.1 220ns 0.25ns 0.968ns 0.00377 0 0 272 B
master ObjectExtractorSimpleBody net472 164ns 0.23ns 0.891ns 0.0446 0 0 281 B
master ObjectExtractorMoreComplexBody net6.0 3.1μs 4.22ns 15.2ns 0.0528 0 0 3.78 KB
master ObjectExtractorMoreComplexBody netcoreapp3.1 3.94μs 2.47ns 9.25ns 0.051 0 0 3.69 KB
master ObjectExtractorMoreComplexBody net472 3.78μs 2.04ns 7.91ns 0.603 0.00591 0 3.8 KB
#6116 AllCycleSimpleBody net6.0 73.8μs 127ns 492ns 0.0734 0 0 6 KB
#6116 AllCycleSimpleBody netcoreapp3.1 62.6μs 146ns 565ns 0.0928 0 0 6.95 KB
#6116 AllCycleSimpleBody net472 48.2μs 74.3ns 288ns 1.32 0 0 8.34 KB
#6116 AllCycleMoreComplexBody net6.0 79.7μs 114ns 442ns 0.119 0 0 9.51 KB
#6116 AllCycleMoreComplexBody netcoreapp3.1 70.5μs 116ns 448ns 0.141 0 0 10.37 KB
#6116 AllCycleMoreComplexBody net472 55.6μs 45.6ns 171ns 1.87 0.0276 0 11.85 KB
#6116 ObjectExtractorSimpleBody net6.0 144ns 0.143ns 0.535ns 0.00392 0 0 280 B
#6116 ObjectExtractorSimpleBody netcoreapp3.1 220ns 0.295ns 1.14ns 0.00377 0 0 272 B
#6116 ObjectExtractorSimpleBody net472 163ns 0.302ns 1.17ns 0.0446 0 0 281 B
#6116 ObjectExtractorMoreComplexBody net6.0 3.05μs 1.65ns 6.18ns 0.0524 0 0 3.78 KB
#6116 ObjectExtractorMoreComplexBody netcoreapp3.1 4.06μs 2.99ns 11.2ns 0.0511 0 0 3.69 KB
#6116 ObjectExtractorMoreComplexBody net472 3.74μs 2.6ns 9.72ns 0.603 0.00565 0 3.8 KB
Benchmarks.Trace.Asm.AppSecEncoderBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EncodeArgs net6.0 38μs 24.5ns 94.7ns 0.456 0 0 32.4 KB
master EncodeArgs netcoreapp3.1 54.2μs 24ns 92.8ns 0.432 0 0 32.4 KB
master EncodeArgs net472 66.5μs 43.2ns 167ns 5.15 0.0664 0 32.5 KB
master EncodeLegacyArgs net6.0 69.6μs 51.8ns 200ns 0 0 0 2.14 KB
master EncodeLegacyArgs netcoreapp3.1 103μs 41.9ns 157ns 0 0 0 2.14 KB
master EncodeLegacyArgs net472 150μs 39.5ns 148ns 0.302 0 0 2.15 KB
#6116 EncodeArgs net6.0 38.4μs 21.3ns 82.4ns 0.442 0 0 32.4 KB
#6116 EncodeArgs netcoreapp3.1 54μs 28.8ns 104ns 0.43 0 0 32.4 KB
#6116 EncodeArgs net472 67.7μs 23.3ns 80.7ns 5.13 0.068 0 32.5 KB
#6116 EncodeLegacyArgs net6.0 76.9μs 346ns 1.34μs 0.0361 0 0 2.14 KB
#6116 EncodeLegacyArgs netcoreapp3.1 105μs 136ns 528ns 0 0 0 2.14 KB
#6116 EncodeLegacyArgs net472 151μs 47.7ns 185ns 0.301 0 0 2.15 KB
Benchmarks.Trace.Asm.AppSecWafBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master RunWafRealisticBenchmark net6.0 188μs 507ns 1.96μs 0 0 0 2.44 KB
master RunWafRealisticBenchmark netcoreapp3.1 196μs 130ns 503ns 0 0 0 2.39 KB
master RunWafRealisticBenchmark net472 210μs 133ns 497ns 0.313 0 0 2.46 KB
master RunWafRealisticBenchmarkWithAttack net6.0 121μs 36.4ns 131ns 0 0 0 1.47 KB
master RunWafRealisticBenchmarkWithAttack netcoreapp3.1 131μs 139ns 539ns 0 0 0 1.46 KB
master RunWafRealisticBenchmarkWithAttack net472 139μs 57.5ns 223ns 0.208 0 0 1.48 KB
#6116 RunWafRealisticBenchmark net6.0 187μs 96.6ns 374ns 0 0 0 2.44 KB
#6116 RunWafRealisticBenchmark netcoreapp3.1 194μs 69.9ns 262ns 0 0 0 2.39 KB
#6116 RunWafRealisticBenchmark net472 209μs 51.6ns 193ns 0.313 0 0 2.46 KB
#6116 RunWafRealisticBenchmarkWithAttack net6.0 122μs 101ns 391ns 0 0 0 1.47 KB
#6116 RunWafRealisticBenchmarkWithAttack netcoreapp3.1 130μs 125ns 482ns 0 0 0 1.46 KB
#6116 RunWafRealisticBenchmarkWithAttack net472 138μs 40.4ns 157ns 0.207 0 0 1.49 KB
Benchmarks.Trace.Iast.StringAspectsBenchmark - Same speed ✔️ Fewer allocations 🎉

Fewer allocations 🎉 in #6116

Benchmark Base Allocated Diff Allocated Change Change %
Benchmarks.Trace.Iast.StringAspectsBenchmark.StringConcatBenchmark‑net472 59.71 KB 58.79 KB -920 B -1.54%

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StringConcatBenchmark net6.0 62μs 750ns 7.5μs 0 0 0 43.44 KB
master StringConcatBenchmark netcoreapp3.1 54.2μs 314ns 2.51μs 0 0 0 42.64 KB
master StringConcatBenchmark net472 37.1μs 82.1ns 284ns 0 0 0 59.71 KB
master StringConcatAspectBenchmark net6.0 276μs 5.74μs 56μs 0 0 0 254.9 KB
master StringConcatAspectBenchmark netcoreapp3.1 331μs 2.11μs 20.1μs 0 0 0 252.79 KB
master StringConcatAspectBenchmark net472 293μs 6.96μs 67.4μs 0 0 0 278.53 KB
#6116 StringConcatBenchmark net6.0 61.6μs 756ns 7.48μs 0 0 0 43.44 KB
#6116 StringConcatBenchmark netcoreapp3.1 61.5μs 844ns 8.31μs 0 0 0 42.64 KB
#6116 StringConcatBenchmark net472 37.1μs 62.9ns 218ns 0 0 0 58.79 KB
#6116 StringConcatAspectBenchmark net6.0 320μs 1.74μs 10.7μs 0 0 0 255.53 KB
#6116 StringConcatAspectBenchmark netcoreapp3.1 347μs 2μs 16.8μs 0 0 0 252.56 KB
#6116 StringConcatAspectBenchmark net472 287μs 5.72μs 55.5μs 0 0 0 278.53 KB

@andrewlock
Copy link
Member

andrewlock commented Oct 4, 2024

Benchmarks Report for tracer 🐌

Benchmarks for #6116 compared to master:

  • 2 benchmarks are faster, with geometric mean 1.126
  • All benchmarks have the same allocations

The following thresholds were used for comparing the benchmark speeds:

  • Mann–Whitney U test with statistical test for significance of 5%
  • Only results indicating a difference greater than 10% and 0.3 ns are considered.

Allocation changes below 0.5% are ignored.

Benchmark details

Benchmarks.Trace.ActivityBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartStopWithChild net6.0 7.86μs 43.9ns 285ns 0.0153 0.00766 0 5.43 KB
master StartStopWithChild netcoreapp3.1 9.94μs 48.5ns 206ns 0.0197 0.00987 0 5.62 KB
master StartStopWithChild net472 17.4μs 76.2ns 295ns 1.04 0.332 0.102 6.07 KB
#6116 StartStopWithChild net6.0 7.9μs 44.4ns 311ns 0.0115 0.00385 0 5.43 KB
#6116 StartStopWithChild netcoreapp3.1 10.1μs 55.2ns 312ns 0.0195 0.00973 0 5.62 KB
#6116 StartStopWithChild net472 17.5μs 88.6ns 406ns 1.02 0.301 0.092 6.07 KB
Benchmarks.Trace.AgentWriterBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 485μs 548ns 2.12μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 636μs 549ns 2.12μs 0 0 0 2.7 KB
master WriteAndFlushEnrichedTraces net472 839μs 418ns 1.56μs 0.417 0 0 3.3 KB
#6116 WriteAndFlushEnrichedTraces net6.0 479μs 684ns 2.65μs 0 0 0 2.7 KB
#6116 WriteAndFlushEnrichedTraces netcoreapp3.1 630μs 640ns 2.48μs 0 0 0 2.7 KB
#6116 WriteAndFlushEnrichedTraces net472 835μs 409ns 1.47μs 0.419 0 0 3.3 KB
Benchmarks.Trace.AspNetCoreBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendRequest net6.0 204μs 1.09μs 6.09μs 0.188 0 0 18.45 KB
master SendRequest netcoreapp3.1 244μs 1.4μs 10.9μs 0.252 0 0 20.61 KB
master SendRequest net472 0.000749ns 0.000553ns 0.00214ns 0 0 0 0 b
#6116 SendRequest net6.0 216μs 1.24μs 11.3μs 0.196 0 0 18.45 KB
#6116 SendRequest netcoreapp3.1 228μs 1.27μs 8.02μs 0.23 0 0 20.61 KB
#6116 SendRequest net472 0.0101ns 0.00347ns 0.0134ns 0 0 0 0 b
Benchmarks.Trace.CIVisibilityProtocolWriterBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master WriteAndFlushEnrichedTraces net6.0 581μs 3.24μs 20.7μs 0.561 0 0 41.56 KB
master WriteAndFlushEnrichedTraces netcoreapp3.1 706μs 3.6μs 21.9μs 0.349 0 0 41.8 KB
master WriteAndFlushEnrichedTraces net472 866μs 1.91μs 7.15μs 8.13 2.57 0.428 53.25 KB
#6116 WriteAndFlushEnrichedTraces net6.0 585μs 2.98μs 13.6μs 0.556 0 0 41.45 KB
#6116 WriteAndFlushEnrichedTraces netcoreapp3.1 677μs 3.52μs 17.6μs 0.332 0 0 41.71 KB
#6116 WriteAndFlushEnrichedTraces net472 891μs 3.8μs 14.7μs 8.13 2.57 0.428 53.34 KB
Benchmarks.Trace.DbCommandBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master ExecuteNonQuery net6.0 1.24μs 0.753ns 2.82ns 0.0144 0 0 1.02 KB
master ExecuteNonQuery netcoreapp3.1 1.85μs 1.89ns 7.32ns 0.014 0 0 1.02 KB
master ExecuteNonQuery net472 2.08μs 2.4ns 8.98ns 0.156 0 0 987 B
#6116 ExecuteNonQuery net6.0 1.35μs 1.66ns 6.44ns 0.0141 0 0 1.02 KB
#6116 ExecuteNonQuery netcoreapp3.1 1.71μs 1.59ns 6.16ns 0.0139 0 0 1.02 KB
#6116 ExecuteNonQuery net472 2.08μs 2.65ns 9.91ns 0.157 0 0 987 B
Benchmarks.Trace.ElasticsearchBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master CallElasticsearch net6.0 1.24μs 0.619ns 2.23ns 0.0137 0 0 976 B
master CallElasticsearch netcoreapp3.1 1.54μs 1.67ns 6.25ns 0.0131 0 0 976 B
master CallElasticsearch net472 2.53μs 1.17ns 4.55ns 0.157 0 0 995 B
master CallElasticsearchAsync net6.0 1.37μs 0.919ns 3.44ns 0.0131 0 0 952 B
master CallElasticsearchAsync netcoreapp3.1 1.62μs 1.68ns 6.51ns 0.0138 0 0 1.02 KB
master CallElasticsearchAsync net472 2.59μs 0.949ns 3.68ns 0.166 0 0 1.05 KB
#6116 CallElasticsearch net6.0 1.22μs 0.508ns 1.9ns 0.0135 0 0 976 B
#6116 CallElasticsearch netcoreapp3.1 1.58μs 0.603ns 2.26ns 0.0134 0 0 976 B
#6116 CallElasticsearch net472 2.45μs 1.91ns 7.39ns 0.157 0 0 995 B
#6116 CallElasticsearchAsync net6.0 1.24μs 0.871ns 3.26ns 0.0131 0 0 952 B
#6116 CallElasticsearchAsync netcoreapp3.1 1.58μs 0.866ns 3.24ns 0.0134 0 0 1.02 KB
#6116 CallElasticsearchAsync net472 2.55μs 1.01ns 3.93ns 0.166 0 0 1.05 KB
Benchmarks.Trace.GraphQLBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master ExecuteAsync net6.0 1.22μs 0.847ns 3.28ns 0.0132 0 0 952 B
master ExecuteAsync netcoreapp3.1 1.66μs 0.489ns 1.89ns 0.0126 0 0 952 B
master ExecuteAsync net472 1.74μs 0.483ns 1.87ns 0.145 0 0 915 B
#6116 ExecuteAsync net6.0 1.27μs 0.612ns 2.29ns 0.0135 0 0 952 B
#6116 ExecuteAsync netcoreapp3.1 1.59μs 0.776ns 2.9ns 0.0127 0 0 952 B
#6116 ExecuteAsync net472 1.82μs 0.458ns 1.71ns 0.145 0 0 915 B
Benchmarks.Trace.HttpClientBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendAsync net6.0 4.27μs 19.1ns 73.9ns 0.0312 0 0 2.22 KB
master SendAsync netcoreapp3.1 5.27μs 10.3ns 39.8ns 0.0366 0 0 2.76 KB
master SendAsync net472 7.75μs 4.71ns 18.2ns 0.5 0 0 3.15 KB
#6116 SendAsync net6.0 4.1μs 1.52ns 5.67ns 0.0307 0 0 2.22 KB
#6116 SendAsync netcoreapp3.1 5.13μs 2.39ns 8.95ns 0.0358 0 0 2.76 KB
#6116 SendAsync net472 7.83μs 1.82ns 7.04ns 0.496 0 0 3.15 KB
Benchmarks.Trace.ILoggerBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 1.54μs 1.1ns 4.13ns 0.023 0 0 1.64 KB
master EnrichedLog netcoreapp3.1 2.1μs 1.3ns 4.86ns 0.0221 0 0 1.64 KB
master EnrichedLog net472 2.64μs 1.02ns 3.94ns 0.249 0 0 1.57 KB
#6116 EnrichedLog net6.0 1.46μs 0.839ns 3.14ns 0.0229 0 0 1.64 KB
#6116 EnrichedLog netcoreapp3.1 2.31μs 1.15ns 4.44ns 0.022 0 0 1.64 KB
#6116 EnrichedLog net472 2.57μs 1.62ns 6.28ns 0.249 0 0 1.57 KB
Benchmarks.Trace.Log4netBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 114μs 119ns 462ns 0.0577 0 0 4.28 KB
master EnrichedLog netcoreapp3.1 121μs 249ns 964ns 0.0602 0 0 4.28 KB
master EnrichedLog net472 152μs 165ns 616ns 0.679 0.226 0 4.46 KB
#6116 EnrichedLog net6.0 117μs 214ns 829ns 0.0589 0 0 4.28 KB
#6116 EnrichedLog netcoreapp3.1 122μs 171ns 664ns 0 0 0 4.28 KB
#6116 EnrichedLog net472 150μs 224ns 839ns 0.675 0.225 0 4.46 KB
Benchmarks.Trace.NLogBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 3.06μs 1.5ns 5.39ns 0.0304 0 0 2.2 KB
master EnrichedLog netcoreapp3.1 4.34μs 2.23ns 8.62ns 0.03 0 0 2.2 KB
master EnrichedLog net472 4.85μs 1.88ns 6.78ns 0.32 0 0 2.02 KB
#6116 EnrichedLog net6.0 3.12μs 4.25ns 15.9ns 0.031 0 0 2.2 KB
#6116 EnrichedLog netcoreapp3.1 4.18μs 4.47ns 17.3ns 0.0289 0 0 2.2 KB
#6116 EnrichedLog net472 4.86μs 1.03ns 3.99ns 0.321 0 0 2.02 KB
Benchmarks.Trace.RedisBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master SendReceive net6.0 1.27μs 0.59ns 2.13ns 0.0159 0 0 1.14 KB
master SendReceive netcoreapp3.1 1.76μs 1.21ns 4.67ns 0.015 0 0 1.14 KB
master SendReceive net472 2.13μs 1.88ns 7.29ns 0.183 0.00106 0 1.16 KB
#6116 SendReceive net6.0 1.28μs 0.913ns 3.42ns 0.016 0 0 1.14 KB
#6116 SendReceive netcoreapp3.1 1.71μs 1.15ns 4.45ns 0.0152 0 0 1.14 KB
#6116 SendReceive net472 2.11μs 1.29ns 5ns 0.184 0.00105 0 1.16 KB
Benchmarks.Trace.SerilogBenchmark - Same speed ✔️ Same allocations ✔️

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master EnrichedLog net6.0 2.76μs 0.621ns 2.32ns 0.0222 0 0 1.6 KB
master EnrichedLog netcoreapp3.1 3.92μs 1.1ns 4.26ns 0.0215 0 0 1.65 KB
master EnrichedLog net472 4.4μs 1.85ns 7.17ns 0.323 0 0 2.04 KB
#6116 EnrichedLog net6.0 2.74μs 0.886ns 3.19ns 0.022 0 0 1.6 KB
#6116 EnrichedLog netcoreapp3.1 4.03μs 2.19ns 8.18ns 0.0221 0 0 1.65 KB
#6116 EnrichedLog net472 4.38μs 1.41ns 5.28ns 0.323 0 0 2.04 KB
Benchmarks.Trace.SpanBenchmark - Faster 🎉 Same allocations ✔️

Faster 🎉 in #6116

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.SpanBenchmark.StartFinishScope‑net6.0 1.133 544.75 480.80

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master StartFinishSpan net6.0 403ns 0.194ns 0.752ns 0.00816 0 0 576 B
master StartFinishSpan netcoreapp3.1 574ns 0.486ns 1.75ns 0.0077 0 0 576 B
master StartFinishSpan net472 717ns 0.916ns 3.43ns 0.0916 0 0 578 B
master StartFinishScope net6.0 545ns 0.305ns 1.18ns 0.00987 0 0 696 B
master StartFinishScope netcoreapp3.1 696ns 0.34ns 1.27ns 0.00944 0 0 696 B
master StartFinishScope net472 988ns 1.13ns 4.38ns 0.104 0 0 658 B
#6116 StartFinishSpan net6.0 405ns 0.257ns 0.996ns 0.00814 0 0 576 B
#6116 StartFinishSpan netcoreapp3.1 626ns 0.395ns 1.53ns 0.00774 0 0 576 B
#6116 StartFinishSpan net472 679ns 0.785ns 3.04ns 0.0918 0 0 578 B
#6116 StartFinishScope net6.0 481ns 0.334ns 1.29ns 0.00965 0 0 696 B
#6116 StartFinishScope netcoreapp3.1 699ns 0.305ns 1.18ns 0.00947 0 0 696 B
#6116 StartFinishScope net472 907ns 1.31ns 5.07ns 0.105 0 0 658 B
Benchmarks.Trace.TraceAnnotationsBenchmark - Faster 🎉 Same allocations ✔️

Faster 🎉 in #6116

Benchmark base/diff Base Median (ns) Diff Median (ns) Modality
Benchmarks.Trace.TraceAnnotationsBenchmark.RunOnMethodBegin‑net6.0 1.118 679.78 608.01

Raw results

Branch Method Toolchain Mean StdError StdDev Gen 0 Gen 1 Gen 2 Allocated
master RunOnMethodBegin net6.0 680ns 0.402ns 1.5ns 0.0099 0 0 696 B
master RunOnMethodBegin netcoreapp3.1 958ns 0.33ns 1.28ns 0.00943 0 0 696 B
master RunOnMethodBegin net472 1.18μs 0.506ns 1.89ns 0.104 0 0 658 B
#6116 RunOnMethodBegin net6.0 608ns 0.223ns 0.863ns 0.00955 0 0 696 B
#6116 RunOnMethodBegin netcoreapp3.1 949ns 0.433ns 1.68ns 0.00947 0 0 696 B
#6116 RunOnMethodBegin net472 1.15μs 1.33ns 5.15ns 0.104 0 0 658 B

@andrewlock
Copy link
Member

andrewlock commented Oct 4, 2024

Throughput/Crank Report ⚡

Throughput results for AspNetCoreSimpleController comparing the following branches/commits:

Cases where throughput results for the PR are worse than latest master (5% drop or greater), results are shown in red.

Note that these results are based on a single point-in-time result for each branch. For full results, see one of the many, many dashboards!

gantt
    title Throughput Linux x64 (Total requests) 
    dateFormat  X
    axisFormat %s
    section Baseline
    This PR (6116) (11.148M)   : 0, 11147615
    master (11.155M)   : 0, 11155081
    benchmarks/2.9.0 (11.081M)   : 0, 11080577

    section Automatic
    This PR (6116) (7.289M)   : 0, 7289168
    master (7.305M)   : 0, 7305110
    benchmarks/2.9.0 (7.732M)   : 0, 7732233

    section Trace stats
    master (7.702M)   : 0, 7701988

    section Manual
    master (11.059M)   : 0, 11059270

    section Manual + Automatic
    This PR (6116) (6.780M)   : 0, 6780180
    master (6.814M)   : 0, 6814282

    section DD_TRACE_ENABLED=0
    master (10.361M)   : 0, 10360619

Loading
gantt
    title Throughput Linux arm64 (Total requests) 
    dateFormat  X
    axisFormat %s
    section Baseline
    This PR (6116) (9.609M)   : 0, 9608880
    master (9.579M)   : 0, 9579150
    benchmarks/2.9.0 (9.798M)   : 0, 9798067

    section Automatic
    This PR (6116) (6.560M)   : 0, 6559994
    master (6.566M)   : 0, 6565557

    section Trace stats
    master (6.905M)   : 0, 6904856

    section Manual
    master (9.517M)   : 0, 9517110

    section Manual + Automatic
    This PR (6116) (6.100M)   : 0, 6100146
    master (6.276M)   : 0, 6275958

    section DD_TRACE_ENABLED=0
    master (9.030M)   : 0, 9029662

Loading
gantt
    title Throughput Windows x64 (Total requests) 
    dateFormat  X
    axisFormat %s
    section Baseline
    This PR (6116) (10.141M)   : 0, 10140587
    master (9.971M)   : 0, 9971352
    benchmarks/2.9.0 (10.067M)   : 0, 10067315

    section Automatic
    This PR (6116) (6.629M)   : 0, 6629329
    master (6.722M)   : 0, 6722260
    benchmarks/2.9.0 (7.552M)   : 0, 7552193

    section Trace stats
    master (7.411M)   : 0, 7411045

    section Manual
    master (10.212M)   : 0, 10212002

    section Manual + Automatic
    This PR (6116) (6.288M)   : 0, 6288346
    master (6.485M)   : 0, 6485151

    section DD_TRACE_ENABLED=0
    master (9.627M)   : 0, 9627344

Loading

@NachoEchevarria NachoEchevarria marked this pull request as ready for review October 8, 2024 13:02
@NachoEchevarria NachoEchevarria requested review from a team as code owners October 8, 2024 13:02
@NachoEchevarria NachoEchevarria changed the title [ASM] Send user agent header as string to the waf [ASM] Send header values as string to the waf Oct 9, 2024
@NachoEchevarria NachoEchevarria changed the title [ASM] Send header values as string to the waf [ASM] Send header values as string to the WAF Oct 9, 2024
@NachoEchevarria NachoEchevarria requested review from a team as code owners October 11, 2024 08:15
@NachoEchevarria NachoEchevarria marked this pull request as draft October 11, 2024 09:02
@NachoEchevarria NachoEchevarria force-pushed the nacho/SendUserAgentHeaderAsStringToTheWAF branch from 7d791db to 39557e5 Compare October 11, 2024 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants