-
Notifications
You must be signed in to change notification settings - Fork 312
Add new features for trace tagging rules #9131
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
ee7db66
to
b6e4650
Compare
case STRING: | ||
return reader.nextString(); | ||
case NUMBER: | ||
String numberStr = reader.nextString(); |
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.
necessary for this part
5ca7317
to
5ef6358
Compare
5ef6358
to
e6718ae
Compare
Hi! 👋 Thanks for your pull request! 🎉 To help us review it, please make sure to:
If you need help, please check our contributing guidelines. |
9ad3778
to
e83bb0f
Compare
🎯 Code Coverage 🔗 Commit SHA: 44c4962 | Docs | Was this helpful? Give us feedback! |
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 46 metrics, 13 unstable metrics. Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.53.0-SNAPSHOT~44c4962444, baseline=1.53.0-SNAPSHOT~890497c9aa
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.048 s) : 0, 1047689
Total [baseline] (8.616 s) : 0, 8616402
Agent [candidate] (1.054 s) : 0, 1053998
Total [candidate] (8.63 s) : 0, 8629548
section iast
Agent [baseline] (1.19 s) : 0, 1190057
Total [baseline] (9.408 s) : 0, 9407752
Agent [candidate] (1.203 s) : 0, 1203173
Total [candidate] (9.393 s) : 0, 9392611
gantt
title insecure-bank - break down per module: candidate=1.53.0-SNAPSHOT~44c4962444, baseline=1.53.0-SNAPSHOT~890497c9aa
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.453 ms) : 0, 1453
crashtracking [candidate] (1.467 ms) : 0, 1467
BytebuddyAgent [baseline] (732.892 ms) : 0, 732892
BytebuddyAgent [candidate] (737.683 ms) : 0, 737683
GlobalTracer [baseline] (241.99 ms) : 0, 241990
GlobalTracer [candidate] (244.753 ms) : 0, 244753
AppSec [baseline] (30.028 ms) : 0, 30028
AppSec [candidate] (30.528 ms) : 0, 30528
Debugger [baseline] (6.024 ms) : 0, 6024
Debugger [candidate] (6.138 ms) : 0, 6138
Remote Config [baseline] (666.195 µs) : 0, 666
Remote Config [candidate] (680.869 µs) : 0, 681
Telemetry [baseline] (13.676 ms) : 0, 13676
Telemetry [candidate] (11.6 ms) : 0, 11600
section iast
crashtracking [baseline] (1.469 ms) : 0, 1469
crashtracking [candidate] (1.492 ms) : 0, 1492
BytebuddyAgent [baseline] (859.682 ms) : 0, 859682
BytebuddyAgent [candidate] (871.293 ms) : 0, 871293
GlobalTracer [baseline] (234.597 ms) : 0, 234597
GlobalTracer [candidate] (235.65 ms) : 0, 235650
AppSec [baseline] (29.507 ms) : 0, 29507
AppSec [candidate] (25.554 ms) : 0, 25554
Debugger [baseline] (5.779 ms) : 0, 5779
Debugger [candidate] (8.479 ms) : 0, 8479
Remote Config [baseline] (619.525 µs) : 0, 620
Remote Config [candidate] (608.686 µs) : 0, 609
Telemetry [baseline] (8.36 ms) : 0, 8360
Telemetry [candidate] (8.252 ms) : 0, 8252
IAST [baseline] (28.867 ms) : 0, 28867
IAST [candidate] (30.418 ms) : 0, 30418
Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.53.0-SNAPSHOT~44c4962444, baseline=1.53.0-SNAPSHOT~890497c9aa
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.05 s) : 0, 1049662
Total [baseline] (10.796 s) : 0, 10796312
Agent [candidate] (1.066 s) : 0, 1065608
Total [candidate] (10.701 s) : 0, 10700811
section appsec
Agent [baseline] (1.232 s) : 0, 1232215
Total [baseline] (10.801 s) : 0, 10800626
Agent [candidate] (1.235 s) : 0, 1235397
Total [candidate] (10.904 s) : 0, 10903659
section iast
Agent [baseline] (1.18 s) : 0, 1179947
Total [baseline] (10.979 s) : 0, 10978819
Agent [candidate] (1.191 s) : 0, 1190564
Total [candidate] (10.95 s) : 0, 10950483
section profiling
Agent [baseline] (1.21 s) : 0, 1209771
Total [baseline] (10.911 s) : 0, 10911133
Agent [candidate] (1.198 s) : 0, 1197735
Total [candidate] (10.841 s) : 0, 10841024
gantt
title petclinic - break down per module: candidate=1.53.0-SNAPSHOT~44c4962444, baseline=1.53.0-SNAPSHOT~890497c9aa
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.456 ms) : 0, 1456
crashtracking [candidate] (1.484 ms) : 0, 1484
BytebuddyAgent [baseline] (734.385 ms) : 0, 734385
BytebuddyAgent [candidate] (744.428 ms) : 0, 744428
GlobalTracer [baseline] (242.889 ms) : 0, 242889
GlobalTracer [candidate] (246.469 ms) : 0, 246469
AppSec [baseline] (30.124 ms) : 0, 30124
AppSec [candidate] (30.576 ms) : 0, 30576
Debugger [baseline] (6.04 ms) : 0, 6040
Debugger [candidate] (6.095 ms) : 0, 6095
Remote Config [baseline] (668.195 µs) : 0, 668
Remote Config [candidate] (676.273 µs) : 0, 676
Telemetry [baseline] (12.973 ms) : 0, 12973
Telemetry [candidate] (14.504 ms) : 0, 14504
section appsec
crashtracking [baseline] (1.462 ms) : 0, 1462
crashtracking [candidate] (1.471 ms) : 0, 1471
BytebuddyAgent [baseline] (761.357 ms) : 0, 761357
BytebuddyAgent [candidate] (766.049 ms) : 0, 766049
GlobalTracer [baseline] (237.371 ms) : 0, 237371
GlobalTracer [candidate] (238.613 ms) : 0, 238613
AppSec [baseline] (171.171 ms) : 0, 171171
AppSec [candidate] (167.145 ms) : 0, 167145
Debugger [baseline] (6.537 ms) : 0, 6537
Debugger [candidate] (6.7 ms) : 0, 6700
Remote Config [baseline] (664.559 µs) : 0, 665
Remote Config [candidate] (648.129 µs) : 0, 648
Telemetry [baseline] (8.592 ms) : 0, 8592
Telemetry [candidate] (9.457 ms) : 0, 9457
IAST [baseline] (23.759 ms) : 0, 23759
IAST [candidate] (23.945 ms) : 0, 23945
section iast
crashtracking [baseline] (1.455 ms) : 0, 1455
crashtracking [candidate] (1.482 ms) : 0, 1482
BytebuddyAgent [baseline] (851.091 ms) : 0, 851091
BytebuddyAgent [candidate] (859.368 ms) : 0, 859368
GlobalTracer [baseline] (233.458 ms) : 0, 233458
GlobalTracer [candidate] (235.533 ms) : 0, 235533
AppSec [baseline] (28.43 ms) : 0, 28430
AppSec [candidate] (26.496 ms) : 0, 26496
Debugger [baseline] (5.812 ms) : 0, 5812
Debugger [candidate] (6.824 ms) : 0, 6824
Remote Config [baseline] (615.175 µs) : 0, 615
Remote Config [candidate] (612.567 µs) : 0, 613
Telemetry [baseline] (8.436 ms) : 0, 8436
Telemetry [candidate] (8.384 ms) : 0, 8384
IAST [baseline] (29.436 ms) : 0, 29436
IAST [candidate] (30.598 ms) : 0, 30598
section profiling
ProfilingAgent [baseline] (108.959 ms) : 0, 108959
ProfilingAgent [candidate] (107.538 ms) : 0, 107538
crashtracking [baseline] (1.45 ms) : 0, 1450
crashtracking [candidate] (1.435 ms) : 0, 1435
BytebuddyAgent [baseline] (769.228 ms) : 0, 769228
BytebuddyAgent [candidate] (762.844 ms) : 0, 762844
GlobalTracer [baseline] (225.041 ms) : 0, 225041
GlobalTracer [candidate] (222.271 ms) : 0, 222271
AppSec [baseline] (31.222 ms) : 0, 31222
AppSec [candidate] (30.103 ms) : 0, 30103
Debugger [baseline] (6.383 ms) : 0, 6383
Debugger [candidate] (7.02 ms) : 0, 7020
Remote Config [baseline] (707.537 µs) : 0, 708
Remote Config [candidate] (701.992 µs) : 0, 702
Telemetry [baseline] (15.88 ms) : 0, 15880
Telemetry [candidate] (15.392 ms) : 0, 15392
Profiling [baseline] (109.607 ms) : 0, 109607
Profiling [candidate] (108.211 ms) : 0, 108211
LoadParameters
See matching parameters
SummaryFound 2 performance improvements and 1 performance regressions! Performance is the same for 9 metrics, 12 unstable metrics.
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.53.0-SNAPSHOT~44c4962444, baseline=1.53.0-SNAPSHOT~890497c9aa
dateFormat X
axisFormat %s
section baseline
no_agent (4.553 ms) : 4502, 4604
. : milestone, 4553,
iast (9.177 ms) : 9026, 9328
. : milestone, 9177,
iast_FULL (14.03 ms) : 13748, 14313
. : milestone, 14030,
iast_GLOBAL (10.306 ms) : 10110, 10502
. : milestone, 10306,
profiling (8.893 ms) : 8754, 9032
. : milestone, 8893,
tracing (7.476 ms) : 7362, 7590
. : milestone, 7476,
section candidate
no_agent (4.286 ms) : 4226, 4345
. : milestone, 4286,
iast (9.649 ms) : 9485, 9814
. : milestone, 9649,
iast_FULL (14.001 ms) : 13724, 14278
. : milestone, 14001,
iast_GLOBAL (10.538 ms) : 10353, 10722
. : milestone, 10538,
profiling (8.847 ms) : 8691, 9003
. : milestone, 8847,
tracing (7.519 ms) : 7403, 7636
. : milestone, 7519,
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.53.0-SNAPSHOT~44c4962444, baseline=1.53.0-SNAPSHOT~890497c9aa
dateFormat X
axisFormat %s
section baseline
no_agent (37.505 ms) : 37196, 37814
. : milestone, 37505,
appsec (49.472 ms) : 49028, 49915
. : milestone, 49472,
code_origins (43.573 ms) : 43184, 43962
. : milestone, 43573,
iast (44.963 ms) : 44576, 45350
. : milestone, 44963,
profiling (48.007 ms) : 47589, 48425
. : milestone, 48007,
tracing (44.127 ms) : 43753, 44502
. : milestone, 44127,
section candidate
no_agent (37.492 ms) : 37181, 37802
. : milestone, 37492,
appsec (48.421 ms) : 47993, 48850
. : milestone, 48421,
code_origins (44.784 ms) : 44381, 45188
. : milestone, 44784,
iast (43.853 ms) : 43468, 44238
. : milestone, 43853,
profiling (46.059 ms) : 45624, 46493
. : milestone, 46059,
tracing (45.165 ms) : 44779, 45551
. : milestone, 45165,
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.53.0-SNAPSHOT~44c4962444, baseline=1.53.0-SNAPSHOT~890497c9aa
dateFormat X
axisFormat %s
section baseline
no_agent (1.475 ms) : 1463, 1486
. : milestone, 1475,
appsec (3.675 ms) : 3452, 3897
. : milestone, 3675,
iast (2.198 ms) : 2136, 2261
. : milestone, 2198,
iast_GLOBAL (2.247 ms) : 2184, 2310
. : milestone, 2247,
profiling (2.05 ms) : 1999, 2101
. : milestone, 2050,
tracing (2.027 ms) : 1977, 2076
. : milestone, 2027,
section candidate
no_agent (1.475 ms) : 1463, 1486
. : milestone, 1475,
appsec (3.703 ms) : 3486, 3919
. : milestone, 3703,
iast (2.204 ms) : 2141, 2267
. : milestone, 2204,
iast_GLOBAL (2.25 ms) : 2186, 2313
. : milestone, 2250,
profiling (2.07 ms) : 2018, 2123
. : milestone, 2070,
tracing (2.023 ms) : 1974, 2072
. : milestone, 2023,
Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.53.0-SNAPSHOT~44c4962444, baseline=1.53.0-SNAPSHOT~890497c9aa
dateFormat X
axisFormat %s
section baseline
no_agent (15.513 s) : 15513000, 15513000
. : milestone, 15513000,
appsec (14.779 s) : 14779000, 14779000
. : milestone, 14779000,
iast (18.742 s) : 18742000, 18742000
. : milestone, 18742000,
iast_GLOBAL (17.862 s) : 17862000, 17862000
. : milestone, 17862000,
profiling (15.984 s) : 15984000, 15984000
. : milestone, 15984000,
tracing (14.882 s) : 14882000, 14882000
. : milestone, 14882000,
section candidate
no_agent (14.969 s) : 14969000, 14969000
. : milestone, 14969000,
appsec (15.022 s) : 15022000, 15022000
. : milestone, 15022000,
iast (18.885 s) : 18885000, 18885000
. : milestone, 18885000,
iast_GLOBAL (18.127 s) : 18127000, 18127000
. : milestone, 18127000,
profiling (15.447 s) : 15447000, 15447000
. : milestone, 15447000,
tracing (15.118 s) : 15118000, 15118000
. : milestone, 15118000,
|
dd-java-agent/appsec/src/main/java/com/datadog/appsec/config/AppSecConfigServiceImpl.java
Outdated
Show resolved
Hide resolved
try { | ||
// Check if it contains a decimal point to determine if it's a double | ||
if (value.contains(".")) { | ||
return Double.parseDouble(value); | ||
} else { | ||
// Try to parse as integer first | ||
return Long.parseLong(value); | ||
} | ||
} catch (NumberFormatException e) { | ||
return null; | ||
} |
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.
I can similar code 2 times in this PR.
Can it be refactored to some utility function?
c600940
to
ebc5973
Compare
Signed-off-by: sezen.leblay <[email protected]>
ebc5973
to
44c4962
Compare
What Does This Do
Adds trace tagging features in accordance with https://docs.google.com/document/d/1bqDtGgMJgsTW6I16iEcRn1lb9RRQjFRDGim8zRrbs0s/edit?tab=t.0
Motivation
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-57260