-
Notifications
You must be signed in to change notification settings - Fork 303
JMXFetch support for GraalVM Native #8569
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
Conversation
Error: Discovered unresolved method during parsing: org.datadog.jmxfetch.App.<init>(org.datadog.jmxfetch.AppConfig).
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 58 metrics, 13 unstable metrics. Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.50.0-SNAPSHOT~2a1b7525e8, baseline=1.50.0-SNAPSHOT~d5d53cd553
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.022 s) : 0, 1021528
Total [baseline] (10.481 s) : 0, 10481039
Agent [candidate] (1.026 s) : 0, 1025874
Total [candidate] (10.565 s) : 0, 10564872
section appsec
Agent [baseline] (1.162 s) : 0, 1162006
Total [baseline] (10.731 s) : 0, 10731464
Agent [candidate] (1.161 s) : 0, 1161191
Total [candidate] (10.737 s) : 0, 10736516
section iast
Agent [baseline] (1.161 s) : 0, 1160529
Total [baseline] (11.036 s) : 0, 11036120
Agent [candidate] (1.153 s) : 0, 1152758
Total [candidate] (10.922 s) : 0, 10922412
section profiling
Agent [baseline] (1.299 s) : 0, 1299235
Total [baseline] (11.002 s) : 0, 11001735
Agent [candidate] (1.291 s) : 0, 1291120
Total [candidate] (10.913 s) : 0, 10913265
gantt
title petclinic - break down per module: candidate=1.50.0-SNAPSHOT~2a1b7525e8, baseline=1.50.0-SNAPSHOT~d5d53cd553
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (683.383 ms) : 0, 683383
BytebuddyAgent [candidate] (684.882 ms) : 0, 684882
GlobalTracer [baseline] (241.238 ms) : 0, 241238
GlobalTracer [candidate] (242.086 ms) : 0, 242086
AppSec [baseline] (54.508 ms) : 0, 54508
AppSec [candidate] (55.071 ms) : 0, 55071
Debugger [baseline] (8.419 ms) : 0, 8419
Debugger [candidate] (10.532 ms) : 0, 10532
Remote Config [baseline] (714.016 µs) : 0, 714
Remote Config [candidate] (692.533 µs) : 0, 693
Telemetry [baseline] (9.785 ms) : 0, 9785
Telemetry [candidate] (9.059 ms) : 0, 9059
section appsec
BytebuddyAgent [baseline] (700.633 ms) : 0, 700633
BytebuddyAgent [candidate] (700.483 ms) : 0, 700483
GlobalTracer [baseline] (236.937 ms) : 0, 236937
GlobalTracer [candidate] (236.694 ms) : 0, 236694
AppSec [baseline] (175.757 ms) : 0, 175757
AppSec [candidate] (175.324 ms) : 0, 175324
Debugger [baseline] (5.948 ms) : 0, 5948
Debugger [candidate] (5.921 ms) : 0, 5921
Remote Config [baseline] (620.46 µs) : 0, 620
Remote Config [candidate] (619.589 µs) : 0, 620
Telemetry [baseline] (7.79 ms) : 0, 7790
Telemetry [candidate] (7.756 ms) : 0, 7756
IAST [baseline] (21.786 ms) : 0, 21786
IAST [candidate] (21.686 ms) : 0, 21686
section iast
BytebuddyAgent [baseline] (810.919 ms) : 0, 810919
BytebuddyAgent [candidate] (804.801 ms) : 0, 804801
GlobalTracer [baseline] (232.573 ms) : 0, 232573
GlobalTracer [candidate] (231.468 ms) : 0, 231468
AppSec [baseline] (48.883 ms) : 0, 48883
AppSec [candidate] (49.454 ms) : 0, 49454
Debugger [baseline] (5.926 ms) : 0, 5926
Debugger [candidate] (5.901 ms) : 0, 5901
Remote Config [baseline] (610.354 µs) : 0, 610
Remote Config [candidate] (595.388 µs) : 0, 595
Telemetry [baseline] (7.976 ms) : 0, 7976
Telemetry [candidate] (7.892 ms) : 0, 7892
IAST [baseline] (27.713 ms) : 0, 27713
IAST [candidate] (28.357 ms) : 0, 28357
section profiling
BytebuddyAgent [baseline] (683.835 ms) : 0, 683835
BytebuddyAgent [candidate] (678.25 ms) : 0, 678250
GlobalTracer [baseline] (382.825 ms) : 0, 382825
GlobalTracer [candidate] (381.382 ms) : 0, 381382
AppSec [baseline] (55.019 ms) : 0, 55019
AppSec [candidate] (54.101 ms) : 0, 54101
Debugger [baseline] (6.218 ms) : 0, 6218
Debugger [candidate] (6.15 ms) : 0, 6150
Remote Config [baseline] (663.174 µs) : 0, 663
Remote Config [candidate] (654.05 µs) : 0, 654
Telemetry [baseline] (8.213 ms) : 0, 8213
Telemetry [candidate] (8.216 ms) : 0, 8216
ProfilingAgent [baseline] (111.162 ms) : 0, 111162
ProfilingAgent [candidate] (111.404 ms) : 0, 111404
Profiling [baseline] (111.187 ms) : 0, 111187
Profiling [candidate] (111.429 ms) : 0, 111429
Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.50.0-SNAPSHOT~2a1b7525e8, baseline=1.50.0-SNAPSHOT~d5d53cd553
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.017 s) : 0, 1016757
Total [baseline] (8.661 s) : 0, 8660890
Agent [candidate] (1.018 s) : 0, 1018135
Total [candidate] (8.677 s) : 0, 8677073
section iast
Agent [baseline] (1.158 s) : 0, 1157607
Total [baseline] (9.259 s) : 0, 9259174
Agent [candidate] (1.148 s) : 0, 1147926
Total [candidate] (9.235 s) : 0, 9235135
section iast_HARDCODED_SECRET_DISABLED
Agent [baseline] (1.148 s) : 0, 1147871
Total [baseline] (9.267 s) : 0, 9266919
Agent [candidate] (1.149 s) : 0, 1149472
Total [candidate] (9.287 s) : 0, 9287349
section iast_TELEMETRY_OFF
Agent [baseline] (1.153 s) : 0, 1152645
Total [baseline] (9.3 s) : 0, 9299700
Agent [candidate] (1.15 s) : 0, 1150413
Total [candidate] (9.258 s) : 0, 9257522
gantt
title insecure-bank - break down per module: candidate=1.50.0-SNAPSHOT~2a1b7525e8, baseline=1.50.0-SNAPSHOT~d5d53cd553
dateFormat X
axisFormat %s
section tracing
BytebuddyAgent [baseline] (681.705 ms) : 0, 681705
BytebuddyAgent [candidate] (681.734 ms) : 0, 681734
GlobalTracer [baseline] (239.529 ms) : 0, 239529
GlobalTracer [candidate] (239.749 ms) : 0, 239749
AppSec [baseline] (54.642 ms) : 0, 54642
AppSec [candidate] (54.364 ms) : 0, 54364
Debugger [baseline] (6.889 ms) : 0, 6889
Debugger [candidate] (8.332 ms) : 0, 8332
Remote Config [baseline] (691.81 µs) : 0, 692
Remote Config [candidate] (691.175 µs) : 0, 691
Telemetry [baseline] (9.811 ms) : 0, 9811
Telemetry [candidate] (9.792 ms) : 0, 9792
section iast
BytebuddyAgent [baseline] (809.482 ms) : 0, 809482
BytebuddyAgent [candidate] (802.094 ms) : 0, 802094
GlobalTracer [baseline] (231.499 ms) : 0, 231499
GlobalTracer [candidate] (230.259 ms) : 0, 230259
AppSec [baseline] (51.026 ms) : 0, 51026
AppSec [candidate] (49.071 ms) : 0, 49071
Debugger [baseline] (5.897 ms) : 0, 5897
Debugger [candidate] (5.845 ms) : 0, 5845
Remote Config [baseline] (587.715 µs) : 0, 588
Remote Config [candidate] (595.639 µs) : 0, 596
Telemetry [baseline] (7.881 ms) : 0, 7881
Telemetry [candidate] (7.8 ms) : 0, 7800
IAST [baseline] (26.93 ms) : 0, 26930
IAST [candidate] (28.933 ms) : 0, 28933
section iast_HARDCODED_SECRET_DISABLED
BytebuddyAgent [baseline] (801.182 ms) : 0, 801182
BytebuddyAgent [candidate] (802.467 ms) : 0, 802467
GlobalTracer [baseline] (230.337 ms) : 0, 230337
GlobalTracer [candidate] (230.643 ms) : 0, 230643
AppSec [baseline] (49.524 ms) : 0, 49524
AppSec [candidate] (48.563 ms) : 0, 48563
Debugger [baseline] (5.931 ms) : 0, 5931
Debugger [candidate] (5.833 ms) : 0, 5833
Remote Config [baseline] (600.143 µs) : 0, 600
Remote Config [candidate] (583.181 µs) : 0, 583
Telemetry [baseline] (7.913 ms) : 0, 7913
Telemetry [candidate] (7.92 ms) : 0, 7920
IAST [baseline] (28.917 ms) : 0, 28917
IAST [candidate] (30.029 ms) : 0, 30029
section iast_TELEMETRY_OFF
BytebuddyAgent [baseline] (804.894 ms) : 0, 804894
BytebuddyAgent [candidate] (803.459 ms) : 0, 803459
GlobalTracer [baseline] (231.315 ms) : 0, 231315
GlobalTracer [candidate] (230.606 ms) : 0, 230606
AppSec [baseline] (55.941 ms) : 0, 55941
AppSec [candidate] (53.581 ms) : 0, 53581
Debugger [baseline] (5.962 ms) : 0, 5962
Debugger [candidate] (6.013 ms) : 0, 6013
Remote Config [baseline] (606.866 µs) : 0, 607
Remote Config [candidate] (634.137 µs) : 0, 634
Telemetry [baseline] (7.794 ms) : 0, 7794
Telemetry [candidate] (7.839 ms) : 0, 7839
IAST [baseline] (22.5 ms) : 0, 22500
IAST [candidate] (24.832 ms) : 0, 24832
LoadParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 12 metrics, 18 unstable metrics. Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.50.0-SNAPSHOT~2a1b7525e8, baseline=1.50.0-SNAPSHOT~d5d53cd553
dateFormat X
axisFormat %s
section baseline
no_agent (384.02 µs) : 363, 405
. : milestone, 384,
iast (522.933 µs) : 501, 545
. : milestone, 523,
iast_FULL (740.788 µs) : 719, 763
. : milestone, 741,
iast_GLOBAL (567.514 µs) : 545, 590
. : milestone, 568,
iast_HARDCODED_SECRET_DISABLED (521.629 µs) : 499, 544
. : milestone, 522,
iast_INACTIVE (471.668 µs) : 449, 495
. : milestone, 472,
iast_TELEMETRY_OFF (523.771 µs) : 500, 547
. : milestone, 524,
tracing (470.314 µs) : 448, 493
. : milestone, 470,
section candidate
no_agent (386.581 µs) : 366, 407
. : milestone, 387,
iast (526.353 µs) : 504, 548
. : milestone, 526,
iast_FULL (744.656 µs) : 723, 767
. : milestone, 745,
iast_GLOBAL (560.767 µs) : 539, 582
. : milestone, 561,
iast_HARDCODED_SECRET_DISABLED (533.715 µs) : 511, 557
. : milestone, 534,
iast_INACTIVE (472.67 µs) : 450, 496
. : milestone, 473,
iast_TELEMETRY_OFF (509.294 µs) : 486, 533
. : milestone, 509,
tracing (469.914 µs) : 448, 492
. : milestone, 470,
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.50.0-SNAPSHOT~2a1b7525e8, baseline=1.50.0-SNAPSHOT~d5d53cd553
dateFormat X
axisFormat %s
section baseline
no_agent (1.375 ms) : 1355, 1395
. : milestone, 1375,
appsec (1.73 ms) : 1706, 1754
. : milestone, 1730,
appsec_no_iast (1.744 ms) : 1721, 1768
. : milestone, 1744,
code_origins (1.678 ms) : 1651, 1706
. : milestone, 1678,
iast (1.523 ms) : 1498, 1547
. : milestone, 1523,
profiling (1.525 ms) : 1502, 1548
. : milestone, 1525,
tracing (1.509 ms) : 1486, 1531
. : milestone, 1509,
section candidate
no_agent (1.38 ms) : 1360, 1399
. : milestone, 1380,
appsec (1.721 ms) : 1698, 1745
. : milestone, 1721,
appsec_no_iast (1.741 ms) : 1718, 1765
. : milestone, 1741,
code_origins (1.669 ms) : 1643, 1696
. : milestone, 1669,
iast (1.538 ms) : 1514, 1562
. : milestone, 1538,
profiling (1.5 ms) : 1476, 1524
. : milestone, 1500,
tracing (1.498 ms) : 1475, 1522
. : milestone, 1498,
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.50.0-SNAPSHOT~2a1b7525e8, baseline=1.50.0-SNAPSHOT~d5d53cd553
dateFormat X
axisFormat %s
section baseline
no_agent (1.475 ms) : 1464, 1487
. : milestone, 1475,
appsec (2.401 ms) : 2352, 2450
. : milestone, 2401,
iast (2.179 ms) : 2117, 2242
. : milestone, 2179,
iast_GLOBAL (2.229 ms) : 2166, 2291
. : milestone, 2229,
profiling (2.055 ms) : 2004, 2107
. : milestone, 2055,
tracing (2.006 ms) : 1957, 2054
. : milestone, 2006,
section candidate
no_agent (1.473 ms) : 1462, 1485
. : milestone, 1473,
appsec (2.402 ms) : 2352, 2452
. : milestone, 2402,
iast (2.191 ms) : 2128, 2254
. : milestone, 2191,
iast_GLOBAL (2.218 ms) : 2155, 2280
. : milestone, 2218,
profiling (2.046 ms) : 1995, 2098
. : milestone, 2046,
tracing (2.001 ms) : 1952, 2049
. : milestone, 2001,
Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.50.0-SNAPSHOT~2a1b7525e8, baseline=1.50.0-SNAPSHOT~d5d53cd553
dateFormat X
axisFormat %s
section baseline
no_agent (15.451 s) : 15451000, 15451000
. : milestone, 15451000,
appsec (15.244 s) : 15244000, 15244000
. : milestone, 15244000,
iast (18.516 s) : 18516000, 18516000
. : milestone, 18516000,
iast_GLOBAL (18.026 s) : 18026000, 18026000
. : milestone, 18026000,
profiling (14.757 s) : 14757000, 14757000
. : milestone, 14757000,
tracing (15.322 s) : 15322000, 15322000
. : milestone, 15322000,
section candidate
no_agent (15.456 s) : 15456000, 15456000
. : milestone, 15456000,
appsec (15.029 s) : 15029000, 15029000
. : milestone, 15029000,
iast (18.563 s) : 18563000, 18563000
. : milestone, 18563000,
iast_GLOBAL (17.513 s) : 17513000, 17513000
. : milestone, 17513000,
profiling (15.302 s) : 15302000, 15302000
. : milestone, 15302000,
tracing (14.984 s) : 14984000, 14984000
. : milestone, 14984000,
|
634df59
to
c67a3fb
Compare
...in/java/datadog/trace/instrumentation/graal/nativeimage/Target_org_datadog_jmxfetch_App.java
Show resolved
Hide resolved
…h.App.<init>(org.datadog.jmxfetch.AppConfig)."
…ative build error.
c67a3fb
to
fe07e3f
Compare
...java/datadog/trace/instrumentation/graal/nativeimage/Target_org_datadog_jmxfetch_Status.java
Show resolved
Hide resolved
… to fix the GraalVM native build error.
...ace/instrumentation/graal/nativeimage/Target_org_datadog_jmxfetch_reporter_JsonReporter.java
Show resolved
Hide resolved
Hi! 👋 Thanks for your pull request! 🎉 To help us review it, please make sure to:
If you need help, please check our contributing guidelines. |
We recently introduced a (vendored) dependency onto https://github.com/DataDog/dd-trace-java/pull/8526/files This would also need to migrate to The stable config code will also need adjusting to work with plain Java collections instead of relying on bean reflection. cc @mtoffl01 |
dd-java-agent/agent-bootstrap/src/main/java/datadog/trace/bootstrap/Agent.java
Outdated
Show resolved
Hide resolved
This is good to know! Though it doesn't seem to affect the native build at all, and can be done separately from this PR. |
The stable config feature is triggered by the existence of a file, so it likely won't show up unless the file exists at test time I'd also like to avoid having 2 copies of SnakeYaml related types (i.e. from |
Add more extensive error reporting related to metricconfigs
710cf9b
to
80bed74
Compare
Opened #8790 for the snakeyaml-engine migration part |
@@ -39,6 +39,7 @@ if (hasProperty('agentPath')) { | |||
if (withProfiler && property('profiler') == 'true') { | |||
buildArgs.add("-J-Ddd.profiling.enabled=true") | |||
} | |||
buildArgs.add("--enable-monitoring=jmxserver") |
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.
What happens if we try to enable JMXFetch in the native-image without adding this setting?
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.
Oops, it shouldn't be necessary - it'll work without it.
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'll remove it in #8790
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 work!
Just a question about what happens if a users omits --enable-monitoring=jmxserver
and we try to start JXMFetch
Also a reminder that the public docs will need updating to mention --enable-monitoring=jmxserver
What Does This Do
Adds JMXFetch to the GraalVM native build.
Motivation
View JMX metrics, including standard JVM runtime metrics for Java applications built as native images.
Additional Notes
JMXFetch required changes:
Fix and enable quarkus native smoke test:
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: AIDM-541