-
Notifications
You must be signed in to change notification settings - Fork 315
Add telemetry to AI Guard evaluations #9884
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
base: master
Are you sure you want to change the base?
Conversation
223ce1c to
036f183
Compare
|
🎯 Code Coverage 🔗 Commit SHA: 01aed83 | Docs | Datadog PR Page | Was this helpful? Give us feedback! |
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 54 metrics, 11 unstable metrics. Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.55.0-SNAPSHOT~01aed836f3, baseline=1.55.0-SNAPSHOT~33bbc70b29
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.03 s) : 0, 1029748
Total [baseline] (8.702 s) : 0, 8701648
Agent [candidate] (1.032 s) : 0, 1031874
Total [candidate] (8.65 s) : 0, 8649904
section iast
Agent [baseline] (1.164 s) : 0, 1164288
Total [baseline] (9.395 s) : 0, 9394527
Agent [candidate] (1.159 s) : 0, 1158814
Total [candidate] (9.363 s) : 0, 9363197
gantt
title insecure-bank - break down per module: candidate=1.55.0-SNAPSHOT~01aed836f3, baseline=1.55.0-SNAPSHOT~33bbc70b29
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.47 ms) : 0, 1470
crashtracking [candidate] (1.461 ms) : 0, 1461
BytebuddyAgent [baseline] (702.783 ms) : 0, 702783
BytebuddyAgent [candidate] (703.93 ms) : 0, 703930
GlobalTracer [baseline] (244.164 ms) : 0, 244164
GlobalTracer [candidate] (245.165 ms) : 0, 245165
AppSec [baseline] (32.239 ms) : 0, 32239
AppSec [candidate] (32.212 ms) : 0, 32212
Debugger [baseline] (6.37 ms) : 0, 6370
Debugger [candidate] (6.41 ms) : 0, 6410
Remote Config [baseline] (683.785 µs) : 0, 684
Remote Config [candidate] (665.046 µs) : 0, 665
Telemetry [baseline] (13.73 ms) : 0, 13730
Telemetry [candidate] (15.164 ms) : 0, 15164
Flare Poller [baseline] (7.181 ms) : 0, 7181
Flare Poller [candidate] (5.738 ms) : 0, 5738
section iast
crashtracking [baseline] (1.469 ms) : 0, 1469
crashtracking [candidate] (1.46 ms) : 0, 1460
BytebuddyAgent [baseline] (826.304 ms) : 0, 826304
BytebuddyAgent [candidate] (822.722 ms) : 0, 822722
GlobalTracer [baseline] (234.289 ms) : 0, 234289
GlobalTracer [candidate] (233.174 ms) : 0, 233174
AppSec [baseline] (28.925 ms) : 0, 28925
AppSec [candidate] (26.227 ms) : 0, 26227
Debugger [baseline] (6.159 ms) : 0, 6159
Debugger [candidate] (6.154 ms) : 0, 6154
Remote Config [baseline] (599.26 µs) : 0, 599
Remote Config [candidate] (605.655 µs) : 0, 606
Telemetry [baseline] (8.452 ms) : 0, 8452
Telemetry [candidate] (8.317 ms) : 0, 8317
Flare Poller [baseline] (4.11 ms) : 0, 4110
Flare Poller [candidate] (4.093 ms) : 0, 4093
IAST [baseline] (32.687 ms) : 0, 32687
IAST [candidate] (34.928 ms) : 0, 34928
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.55.0-SNAPSHOT~01aed836f3, baseline=1.55.0-SNAPSHOT~33bbc70b29
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.031 s) : 0, 1031334
Total [baseline] (10.854 s) : 0, 10853517
Agent [candidate] (1.03 s) : 0, 1030110
Total [candidate] (10.882 s) : 0, 10881853
section appsec
Agent [baseline] (1.201 s) : 0, 1201293
Total [baseline] (10.859 s) : 0, 10858537
Agent [candidate] (1.204 s) : 0, 1203960
Total [candidate] (10.88 s) : 0, 10879620
section iast
Agent [baseline] (1.16 s) : 0, 1160192
Total [baseline] (11.177 s) : 0, 11176959
Agent [candidate] (1.169 s) : 0, 1169434
Total [candidate] (11.153 s) : 0, 11153348
section profiling
Agent [baseline] (1.173 s) : 0, 1172859
Total [baseline] (10.951 s) : 0, 10951041
Agent [candidate] (1.175 s) : 0, 1174832
Total [candidate] (10.918 s) : 0, 10917898
gantt
title petclinic - break down per module: candidate=1.55.0-SNAPSHOT~01aed836f3, baseline=1.55.0-SNAPSHOT~33bbc70b29
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.466 ms) : 0, 1466
crashtracking [candidate] (1.458 ms) : 0, 1458
BytebuddyAgent [baseline] (703.191 ms) : 0, 703191
BytebuddyAgent [candidate] (702.602 ms) : 0, 702602
GlobalTracer [baseline] (244.863 ms) : 0, 244863
GlobalTracer [candidate] (244.923 ms) : 0, 244923
AppSec [baseline] (32.426 ms) : 0, 32426
AppSec [candidate] (32.179 ms) : 0, 32179
Debugger [baseline] (6.388 ms) : 0, 6388
Debugger [candidate] (6.407 ms) : 0, 6407
Remote Config [baseline] (676.962 µs) : 0, 677
Remote Config [candidate] (665.165 µs) : 0, 665
Telemetry [baseline] (11.566 ms) : 0, 11566
Telemetry [candidate] (14.254 ms) : 0, 14254
Flare Poller [baseline] (9.533 ms) : 0, 9533
Flare Poller [candidate] (6.385 ms) : 0, 6385
section appsec
crashtracking [baseline] (1.468 ms) : 0, 1468
crashtracking [candidate] (1.466 ms) : 0, 1466
BytebuddyAgent [baseline] (725.755 ms) : 0, 725755
BytebuddyAgent [candidate] (726.963 ms) : 0, 726963
GlobalTracer [baseline] (235.455 ms) : 0, 235455
GlobalTracer [candidate] (236.087 ms) : 0, 236087
AppSec [baseline] (173.785 ms) : 0, 173785
AppSec [candidate] (174.413 ms) : 0, 174413
Debugger [baseline] (5.899 ms) : 0, 5899
Debugger [candidate] (5.909 ms) : 0, 5909
Remote Config [baseline] (625.909 µs) : 0, 626
Remote Config [candidate] (625.299 µs) : 0, 625
Telemetry [baseline] (8.392 ms) : 0, 8392
Telemetry [candidate] (8.365 ms) : 0, 8365
Flare Poller [baseline] (3.88 ms) : 0, 3880
Flare Poller [candidate] (3.891 ms) : 0, 3891
IAST [baseline] (24.914 ms) : 0, 24914
IAST [candidate] (25.043 ms) : 0, 25043
section iast
crashtracking [baseline] (1.465 ms) : 0, 1465
crashtracking [candidate] (1.48 ms) : 0, 1480
BytebuddyAgent [baseline] (823.04 ms) : 0, 823040
BytebuddyAgent [candidate] (830.028 ms) : 0, 830028
GlobalTracer [baseline] (233.513 ms) : 0, 233513
GlobalTracer [candidate] (234.825 ms) : 0, 234825
AppSec [baseline] (28.04 ms) : 0, 28040
AppSec [candidate] (28.275 ms) : 0, 28275
Debugger [baseline] (6.188 ms) : 0, 6188
Debugger [candidate] (6.207 ms) : 0, 6207
Remote Config [baseline] (601.277 µs) : 0, 601
Remote Config [candidate] (607.776 µs) : 0, 608
Telemetry [baseline] (8.453 ms) : 0, 8453
Telemetry [candidate] (8.497 ms) : 0, 8497
Flare Poller [baseline] (4.157 ms) : 0, 4157
Flare Poller [candidate] (4.188 ms) : 0, 4188
IAST [baseline] (33.452 ms) : 0, 33452
IAST [candidate] (33.908 ms) : 0, 33908
section profiling
crashtracking [baseline] (1.453 ms) : 0, 1453
crashtracking [candidate] (1.467 ms) : 0, 1467
BytebuddyAgent [baseline] (726.336 ms) : 0, 726336
BytebuddyAgent [candidate] (727.707 ms) : 0, 727707
GlobalTracer [baseline] (219.819 ms) : 0, 219819
GlobalTracer [candidate] (220.412 ms) : 0, 220412
AppSec [baseline] (32.197 ms) : 0, 32197
AppSec [candidate] (32.283 ms) : 0, 32283
Debugger [baseline] (9.913 ms) : 0, 9913
Debugger [candidate] (13.988 ms) : 0, 13988
Remote Config [baseline] (695.453 µs) : 0, 695
Remote Config [candidate] (1.44 ms) : 0, 1440
Telemetry [baseline] (13.087 ms) : 0, 13087
Telemetry [candidate] (8.301 ms) : 0, 8301
Flare Poller [baseline] (4.136 ms) : 0, 4136
Flare Poller [candidate] (4.162 ms) : 0, 4162
ProfilingAgent [baseline] (109.768 ms) : 0, 109768
ProfilingAgent [candidate] (109.462 ms) : 0, 109462
Profiling [baseline] (110.378 ms) : 0, 110378
Profiling [candidate] (110.094 ms) : 0, 110094
LoadParameters
See matching parameters
SummaryFound 3 performance improvements and 3 performance regressions! Performance is the same for 6 metrics, 12 unstable metrics.
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.55.0-SNAPSHOT~01aed836f3, baseline=1.55.0-SNAPSHOT~33bbc70b29
dateFormat X
axisFormat %s
section baseline
no_agent (1.224 ms) : 1211, 1236
. : milestone, 1224,
iast (3.241 ms) : 3196, 3285
. : milestone, 3241,
iast_FULL (5.937 ms) : 5877, 5997
. : milestone, 5937,
iast_GLOBAL (3.645 ms) : 3591, 3698
. : milestone, 3645,
profiling (2.078 ms) : 2059, 2097
. : milestone, 2078,
tracing (1.777 ms) : 1762, 1791
. : milestone, 1777,
section candidate
no_agent (1.2 ms) : 1189, 1212
. : milestone, 1200,
iast (3.343 ms) : 3303, 3384
. : milestone, 3343,
iast_FULL (5.954 ms) : 5893, 6015
. : milestone, 5954,
iast_GLOBAL (3.649 ms) : 3595, 3702
. : milestone, 3649,
profiling (1.913 ms) : 1897, 1929
. : milestone, 1913,
tracing (1.812 ms) : 1797, 1828
. : milestone, 1812,
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.55.0-SNAPSHOT~01aed836f3, baseline=1.55.0-SNAPSHOT~33bbc70b29
dateFormat X
axisFormat %s
section baseline
no_agent (17.005 ms) : 16835, 17176
. : milestone, 17005,
appsec (19.464 ms) : 19264, 19664
. : milestone, 19464,
code_origins (18.688 ms) : 18501, 18875
. : milestone, 18688,
iast (17.555 ms) : 17377, 17733
. : milestone, 17555,
profiling (19.879 ms) : 19679, 20079
. : milestone, 19879,
tracing (18.414 ms) : 18224, 18604
. : milestone, 18414,
section candidate
no_agent (19.425 ms) : 19222, 19628
. : milestone, 19425,
appsec (18.366 ms) : 18179, 18553
. : milestone, 18366,
code_origins (18.379 ms) : 18196, 18563
. : milestone, 18379,
iast (19.343 ms) : 19149, 19536
. : milestone, 19343,
profiling (20.632 ms) : 20422, 20841
. : milestone, 20632,
tracing (17.432 ms) : 17256, 17607
. : milestone, 17432,
DacapoParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 10 metrics, 2 unstable metrics. Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.55.0-SNAPSHOT~01aed836f3, baseline=1.55.0-SNAPSHOT~33bbc70b29
dateFormat X
axisFormat %s
section baseline
no_agent (15.004 s) : 15004000, 15004000
. : milestone, 15004000,
appsec (14.709 s) : 14709000, 14709000
. : milestone, 14709000,
iast (18.308 s) : 18308000, 18308000
. : milestone, 18308000,
iast_GLOBAL (18.036 s) : 18036000, 18036000
. : milestone, 18036000,
profiling (15.808 s) : 15808000, 15808000
. : milestone, 15808000,
tracing (15.334 s) : 15334000, 15334000
. : milestone, 15334000,
section candidate
no_agent (14.958 s) : 14958000, 14958000
. : milestone, 14958000,
appsec (14.943 s) : 14943000, 14943000
. : milestone, 14943000,
iast (18.47 s) : 18470000, 18470000
. : milestone, 18470000,
iast_GLOBAL (17.867 s) : 17867000, 17867000
. : milestone, 17867000,
profiling (15.349 s) : 15349000, 15349000
. : milestone, 15349000,
tracing (15.193 s) : 15193000, 15193000
. : milestone, 15193000,
Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.55.0-SNAPSHOT~01aed836f3, baseline=1.55.0-SNAPSHOT~33bbc70b29
dateFormat X
axisFormat %s
section baseline
no_agent (1.472 ms) : 1461, 1484
. : milestone, 1472,
appsec (3.704 ms) : 3485, 3922
. : milestone, 3704,
iast (2.203 ms) : 2140, 2267
. : milestone, 2203,
iast_GLOBAL (2.24 ms) : 2176, 2304
. : milestone, 2240,
profiling (2.466 ms) : 2236, 2696
. : milestone, 2466,
tracing (2.02 ms) : 1971, 2070
. : milestone, 2020,
section candidate
no_agent (1.473 ms) : 1461, 1484
. : milestone, 1473,
appsec (3.628 ms) : 3416, 3840
. : milestone, 3628,
iast (2.2 ms) : 2137, 2264
. : milestone, 2200,
iast_GLOBAL (2.25 ms) : 2186, 2313
. : milestone, 2250,
profiling (2.048 ms) : 1997, 2099
. : milestone, 2048,
tracing (2.021 ms) : 1972, 2071
. : milestone, 2021,
|
036f183 to
4707290
Compare
| map.put(key1, prop1); | ||
| map.put(key2, prop2); | ||
| private static Map<String, String> mapOf(final String... props) { | ||
| final Map<String, String> map = new HashMap<>(props.length << 1); |
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.
It’s probably not needed since it looks like there are always pairs, but what do you think about adding a safeguard to check that the args count is even, just to avoid a potential ArrayIndexOutOfBoundsException?
| final Map<String, String> map = new HashMap<>(props.length << 1); | |
| if (props.length % 2 != 0) { | |
| throw new IllegalArgumentException("Props must be even"); | |
| } | |
| final Map<String, String> map = new HashMap<>(props.length << 1); |
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.
LGTM just a minor comment
What Does This Do
Adds telemetry to the AI Guard evaluations.
Motivation
We want to track customer usage of the SDK through telemetry metrics.
Additional Notes
Contributor Checklist
type:and (comp:orinst:) labels in addition to any useful labelsclose,fixor any linking keywords when referencing an issue.Use
solvesinstead, and assign the PR milestone to the issueJira ticket: [PROJ-IDENT]