-
Notifications
You must be signed in to change notification settings - Fork 292
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
Add watches support through probe tags #7573
Conversation
Debugger benchmarksParameters
See matching parameters
SummaryFound 5 performance improvements and 0 performance regressions! Performance is the same for 0 metrics, 10 unstable metrics.
See unchanged results
Request duration reports for reportsgantt
title reports - request duration [CI 0.99] : candidate=None, baseline=None
dateFormat X
axisFormat %s
section baseline
noprobe (290.624 µs) : 254, 328
. : milestone, 291,
basic (288.161 µs) : 281, 295
. : milestone, 288,
loop (10.985 ms) : 10962, 11008
. : milestone, 10985,
section candidate
noprobe (306.255 µs) : 245, 368
. : milestone, 306,
basic (310.599 µs) : 279, 342
. : milestone, 311,
loop (10.513 ms) : 10487, 10540
. : milestone, 10513,
|
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 49 metrics, 14 unstable metrics. Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.40.0-SNAPSHOT~fc569797c2, baseline=1.40.0-SNAPSHOT~5765052e34
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.064 s) : 0, 1063772
Total [baseline] (10.384 s) : 0, 10384251
Agent [candidate] (1.069 s) : 0, 1068769
Total [candidate] (10.404 s) : 0, 10403739
section appsec
Agent [baseline] (1.199 s) : 0, 1198510
Total [baseline] (10.683 s) : 0, 10682815
Agent [candidate] (1.202 s) : 0, 1202014
Total [candidate] (10.664 s) : 0, 10663790
section iast
Agent [baseline] (1.186 s) : 0, 1185865
Total [baseline] (10.848 s) : 0, 10847837
Agent [candidate] (1.197 s) : 0, 1197263
Total [candidate] (10.855 s) : 0, 10854748
section profiling
Agent [baseline] (1.264 s) : 0, 1264276
Total [baseline] (10.596 s) : 0, 10595923
Agent [candidate] (1.263 s) : 0, 1263170
Total [candidate] (10.712 s) : 0, 10712192
gantt
title petclinic - break down per module: candidate=1.40.0-SNAPSHOT~fc569797c2, baseline=1.40.0-SNAPSHOT~5765052e34
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (678.965 ms) : 0, 678965
BytebuddyAgent [candidate] (682.678 ms) : 0, 682678
GlobalTracer [baseline] (310.503 ms) : 0, 310503
GlobalTracer [candidate] (311.832 ms) : 0, 311832
AppSec [baseline] (52.496 ms) : 0, 52496
AppSec [candidate] (52.364 ms) : 0, 52364
Remote Config [baseline] (686.461 µs) : 0, 686
Remote Config [candidate] (679.628 µs) : 0, 680
Telemetry [baseline] (7.476 ms) : 0, 7476
Telemetry [candidate] (7.543 ms) : 0, 7543
section appsec
BytebuddyAgent [baseline] (701.467 ms) : 0, 701467
BytebuddyAgent [candidate] (703.255 ms) : 0, 703255
GlobalTracer [baseline] (303.307 ms) : 0, 303307
GlobalTracer [candidate] (303.647 ms) : 0, 303647
AppSec [baseline] (160.441 ms) : 0, 160441
AppSec [candidate] (162.544 ms) : 0, 162544
Remote Config [baseline] (633.566 µs) : 0, 634
Remote Config [candidate] (625.945 µs) : 0, 626
Telemetry [baseline] (8.76 ms) : 0, 8760
Telemetry [candidate] (8.748 ms) : 0, 8748
IAST [baseline] (20.583 ms) : 0, 20583
IAST [candidate] (19.091 ms) : 0, 19091
section iast
BytebuddyAgent [baseline] (788.862 ms) : 0, 788862
BytebuddyAgent [candidate] (797.279 ms) : 0, 797279
GlobalTracer [baseline] (298.26 ms) : 0, 298260
GlobalTracer [candidate] (301.337 ms) : 0, 301337
AppSec [baseline] (51.908 ms) : 0, 51908
AppSec [candidate] (53.052 ms) : 0, 53052
Remote Config [baseline] (619.11 µs) : 0, 619
Remote Config [candidate] (636.539 µs) : 0, 637
Telemetry [baseline] (7.315 ms) : 0, 7315
Telemetry [candidate] (7.483 ms) : 0, 7483
IAST [baseline] (25.309 ms) : 0, 25309
IAST [candidate] (23.731 ms) : 0, 23731
section profiling
ProfilingAgent [baseline] (95.89 ms) : 0, 95890
ProfilingAgent [candidate] (96.672 ms) : 0, 96672
BytebuddyAgent [baseline] (673.604 ms) : 0, 673604
BytebuddyAgent [candidate] (672.283 ms) : 0, 672283
GlobalTracer [baseline] (395.561 ms) : 0, 395561
GlobalTracer [candidate] (395.098 ms) : 0, 395098
AppSec [baseline] (52.996 ms) : 0, 52996
AppSec [candidate] (53.059 ms) : 0, 53059
Remote Config [baseline] (672.616 µs) : 0, 673
Remote Config [candidate] (665.994 µs) : 0, 666
Telemetry [baseline] (7.418 ms) : 0, 7418
Telemetry [candidate] (7.392 ms) : 0, 7392
Profiling [baseline] (95.914 ms) : 0, 95914
Profiling [candidate] (96.696 ms) : 0, 96696
Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.40.0-SNAPSHOT~fc569797c2, baseline=1.40.0-SNAPSHOT~5765052e34
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.063 s) : 0, 1062910
Total [baseline] (8.556 s) : 0, 8556355
Agent [candidate] (1.064 s) : 0, 1063828
Total [candidate] (8.533 s) : 0, 8532834
section iast
Agent [baseline] (1.198 s) : 0, 1198211
Total [baseline] (9.042 s) : 0, 9042175
Agent [candidate] (1.19 s) : 0, 1190353
Total [candidate] (9.029 s) : 0, 9029480
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.197 s) : 0, 1197117
Total [baseline] (9.011 s) : 0, 9011181
Agent [candidate] (1.191 s) : 0, 1191251
Total [candidate] (8.997 s) : 0, 8997395
section iast_TELEMETRY_OFF
Agent [baseline] (1.188 s) : 0, 1188232
Total [baseline] (9.007 s) : 0, 9007247
Agent [candidate] (1.186 s) : 0, 1186251
Total [candidate] (9.04 s) : 0, 9040486
gantt
title insecure-bank - break down per module: candidate=1.40.0-SNAPSHOT~fc569797c2, baseline=1.40.0-SNAPSHOT~5765052e34
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (678.938 ms) : 0, 678938
BytebuddyAgent [candidate] (679.004 ms) : 0, 679004
GlobalTracer [baseline] (309.679 ms) : 0, 309679
GlobalTracer [candidate] (310.674 ms) : 0, 310674
AppSec [baseline] (52.483 ms) : 0, 52483
AppSec [candidate] (52.384 ms) : 0, 52384
Remote Config [baseline] (670.768 µs) : 0, 671
Remote Config [candidate] (659.926 µs) : 0, 660
Telemetry [baseline] (7.506 ms) : 0, 7506
Telemetry [candidate] (7.446 ms) : 0, 7446
section iast
BytebuddyAgent [baseline] (797.891 ms) : 0, 797891
BytebuddyAgent [candidate] (792.363 ms) : 0, 792363
GlobalTracer [baseline] (301.489 ms) : 0, 301489
GlobalTracer [candidate] (299.16 ms) : 0, 299160
AppSec [baseline] (53.638 ms) : 0, 53638
AppSec [candidate] (53.755 ms) : 0, 53755
IAST [baseline] (23.489 ms) : 0, 23489
IAST [candidate] (23.468 ms) : 0, 23468
Remote Config [baseline] (634.749 µs) : 0, 635
Remote Config [candidate] (632.892 µs) : 0, 633
Telemetry [baseline] (7.325 ms) : 0, 7325
Telemetry [candidate] (7.286 ms) : 0, 7286
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (796.747 ms) : 0, 796747
BytebuddyAgent [candidate] (792.358 ms) : 0, 792358
GlobalTracer [baseline] (300.849 ms) : 0, 300849
GlobalTracer [candidate] (299.997 ms) : 0, 299997
AppSec [baseline] (53.298 ms) : 0, 53298
AppSec [candidate] (54.775 ms) : 0, 54775
IAST [baseline] (24.462 ms) : 0, 24462
IAST [candidate] (22.539 ms) : 0, 22539
Remote Config [baseline] (634.819 µs) : 0, 635
Remote Config [candidate] (620.287 µs) : 0, 620
Telemetry [baseline] (7.374 ms) : 0, 7374
Telemetry [candidate] (7.256 ms) : 0, 7256
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (789.78 ms) : 0, 789780
BytebuddyAgent [candidate] (787.927 ms) : 0, 787927
GlobalTracer [baseline] (300.017 ms) : 0, 300017
GlobalTracer [candidate] (299.535 ms) : 0, 299535
AppSec [baseline] (53.977 ms) : 0, 53977
AppSec [candidate] (54.816 ms) : 0, 54816
IAST [baseline] (22.187 ms) : 0, 22187
IAST [candidate] (22.451 ms) : 0, 22451
Remote Config [baseline] (604.605 µs) : 0, 605
Remote Config [candidate] (606.713 µs) : 0, 607
Telemetry [baseline] (8.012 ms) : 0, 8012
Telemetry [candidate] (7.279 ms) : 0, 7279
LoadParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 11 metrics, 17 unstable metrics. Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.40.0-SNAPSHOT~fc569797c2, baseline=1.40.0-SNAPSHOT~5765052e34
dateFormat X
axisFormat %s
section baseline
no_agent (1.349 ms) : 1330, 1369
. : milestone, 1349,
appsec (1.711 ms) : 1686, 1736
. : milestone, 1711,
appsec_no_iast (1.734 ms) : 1710, 1758
. : milestone, 1734,
iast (1.49 ms) : 1467, 1513
. : milestone, 1490,
profiling (1.552 ms) : 1527, 1576
. : milestone, 1552,
tracing (1.47 ms) : 1445, 1495
. : milestone, 1470,
section candidate
no_agent (1.342 ms) : 1322, 1361
. : milestone, 1342,
appsec (1.706 ms) : 1682, 1731
. : milestone, 1706,
appsec_no_iast (1.733 ms) : 1709, 1757
. : milestone, 1733,
iast (1.485 ms) : 1462, 1508
. : milestone, 1485,
profiling (1.511 ms) : 1485, 1537
. : milestone, 1511,
tracing (1.472 ms) : 1448, 1496
. : milestone, 1472,
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.40.0-SNAPSHOT~fc569797c2, baseline=1.40.0-SNAPSHOT~5765052e34
dateFormat X
axisFormat %s
section baseline
no_agent (372.484 µs) : 353, 392
. : milestone, 372,
iast (491.901 µs) : 470, 514
. : milestone, 492,
iast_FULL (556.386 µs) : 535, 578
. : milestone, 556,
iast_GLOBAL (514.309 µs) : 492, 536
. : milestone, 514,
iast_HARDCODED_SECRET_DISABLED (488.364 µs) : 467, 510
. : milestone, 488,
iast_INACTIVE (451.523 µs) : 430, 473
. : milestone, 452,
iast_TELEMETRY_OFF (479.232 µs) : 456, 502
. : milestone, 479,
tracing (446.724 µs) : 426, 467
. : milestone, 447,
section candidate
no_agent (372.736 µs) : 353, 393
. : milestone, 373,
iast (484.396 µs) : 463, 505
. : milestone, 484,
iast_FULL (559.401 µs) : 538, 581
. : milestone, 559,
iast_GLOBAL (512.023 µs) : 490, 534
. : milestone, 512,
iast_HARDCODED_SECRET_DISABLED (485.488 µs) : 464, 507
. : milestone, 485,
iast_INACTIVE (451.634 µs) : 430, 473
. : milestone, 452,
iast_TELEMETRY_OFF (479.667 µs) : 457, 502
. : milestone, 480,
tracing (445.301 µs) : 425, 466
. : milestone, 445,
DacapoParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 12 metrics, 0 unstable metrics. Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.40.0-SNAPSHOT~fc569797c2, baseline=1.40.0-SNAPSHOT~5765052e34
dateFormat X
axisFormat %s
section baseline
no_agent (1.469 ms) : 1457, 1480
. : milestone, 1469,
appsec (2.285 ms) : 2245, 2325
. : milestone, 2285,
iast (2.029 ms) : 1981, 2077
. : milestone, 2029,
iast_GLOBAL (2.109 ms) : 2058, 2160
. : milestone, 2109,
profiling (1.919 ms) : 1879, 1960
. : milestone, 1919,
tracing (1.901 ms) : 1863, 1939
. : milestone, 1901,
section candidate
no_agent (1.474 ms) : 1463, 1486
. : milestone, 1474,
appsec (2.3 ms) : 2259, 2341
. : milestone, 2300,
iast (2.055 ms) : 2004, 2105
. : milestone, 2055,
iast_GLOBAL (2.109 ms) : 2057, 2160
. : milestone, 2109,
profiling (1.941 ms) : 1901, 1982
. : milestone, 1941,
tracing (1.912 ms) : 1873, 1951
. : milestone, 1912,
Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.40.0-SNAPSHOT~fc569797c2, baseline=1.40.0-SNAPSHOT~5765052e34
dateFormat X
axisFormat %s
section baseline
no_agent (15.779 s) : 15779000, 15779000
. : milestone, 15779000,
appsec (15.165 s) : 15165000, 15165000
. : milestone, 15165000,
iast (18.806 s) : 18806000, 18806000
. : milestone, 18806000,
iast_GLOBAL (17.875 s) : 17875000, 17875000
. : milestone, 17875000,
profiling (15.466 s) : 15466000, 15466000
. : milestone, 15466000,
tracing (15.004 s) : 15004000, 15004000
. : milestone, 15004000,
section candidate
no_agent (15.041 s) : 15041000, 15041000
. : milestone, 15041000,
appsec (15.294 s) : 15294000, 15294000
. : milestone, 15294000,
iast (18.872 s) : 18872000, 18872000
. : milestone, 18872000,
iast_GLOBAL (17.808 s) : 17808000, 17808000
. : milestone, 17808000,
profiling (15.17 s) : 15170000, 15170000
. : milestone, 15170000,
tracing (15.189 s) : 15189000, 15189000
. : milestone, 15189000,
|
Watches collect specific (deep) fields to add them exclusively into the snapshot instead of locals/arguments/statics/... Watches are defined using probe definition predefined tags: - dd_watches_dsl - dd_watches_json When you just want to reference deep fields just a.b.c you can use the dsl syntax (like Expression Language). But if you need more advanced (accessing map or list, using filter, any, ... functions) you need to use dd_watches_json and put the Json AST for Expression Language (like log message template with segments). Once the probe is executed, it interprets watches tags to evaluate the expression then add it in the snapshot as special attributes watches.
96b623f
to
fc56979
Compare
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.
nice!
@@ -759,6 +836,7 @@ public static class Builder extends ProbeDefinition.Builder<Builder> { | |||
private String template; | |||
private List<Segment> segments; | |||
private boolean captureSnapshot; | |||
private List<ValueScript> watches; |
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 think should be similar to EvaluationError format. to store "expr" and "value" for each watch. that way in the future the UI can help the user to understand which watch created witch value.
Maybe we should also add "error" if the watch evaluated as error - topics for the RFC I assume
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.
ValueScript
already wraps string representation of the expr and the expression root AST. I am using the string DSL to add it to the snapshot that way we know which watch it is
sb.append("..."); | ||
msg = sb.toString(); | ||
processMsgTemplate(context, logStatus); | ||
processWatches(context, logStatus); |
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.
Do we want watches get processed so normal logs probe as well? neat stuff.
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.
no why?
log templates are already acting as watches
Watches collect specific (deep) fields to add them exclusively into the snapshot instead of locals/arguments/statics/... Watches are defined using probe definition predefined tags: - dd_watches_dsl - dd_watches_json When you just want to reference deep fields just a.b.c you can use the dsl syntax (like Expression Language). But if you need more advanced (accessing map or list, using filter, any, ... functions) you need to use dd_watches_json and put the Json AST for Expression Language (like log message template with segments). Once the probe is executed, it interprets watches tags to evaluate the expression then add it in the snapshot as special attributes watches.
What Does This Do
Watches collect specific (deep) fields to add them exclusively into
the snapshot instead of locals/arguments/statics/...
Watches are defined using probe definition predefined tags:
dd_watches_dsl
dd_watches_json
When you just want to reference deep fields just
a.b.c
you can use thedsl syntax (like Expression Language). But if you need more advanced
(accessing map or list, using filter, any, ... functions) you need to
use
dd_watches_json
and put the Json AST for Expression Language(like log message template with segments).
Once the probe is executed, it interprets watches tags to evaluate the
expression then add it in the snapshot as special attributes
watches
.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: DEBUG-2829