-
Notifications
You must be signed in to change notification settings - Fork 323
🪞 10269 - Feature: CICS tracing #10301
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
- ECIInteraction.execute -- instruments the entry point for CICS calls via IBM's javax.resource.cci.Interaction implementation, creating "cics.execute" span and recording a few tags. - JavaGatewayInstrumentation.flow -- records the peer.* tags on the "cics.execute" span created above, or if it doesn't exist, creates a new "gateway.flow" span. The tests don't fully exercise the CICS client-side code, however they exercise enough to ensure the instrumentation creates spans and adds tags as expected. This requires a few JAR files from IBM's CICS SDK for compliation and testing that are not available in Maven Central. A tar.gz artifact is downloaded from IBM's public CICS support archive and the necessary JARs are extracted, following the same pattern used for the JBoss Wildfly smoke tests.
BenchmarksStartupParameters
See matching parameters
SummaryFound 0 performance improvements and 0 performance regressions! Performance is the same for 55 metrics, 10 unstable metrics. Startup time reports for petclinicgantt
title petclinic - global startup overhead: candidate=1.59.0-SNAPSHOT~47d95f97ec, baseline=1.59.0-SNAPSHOT~92c84e28db
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.088 s) : 0, 1087724
Total [baseline] (10.795 s) : 0, 10794677
Agent [candidate] (1.095 s) : 0, 1094814
Total [candidate] (10.76 s) : 0, 10760416
section appsec
Agent [baseline] (1.266 s) : 0, 1265848
Total [baseline] (10.987 s) : 0, 10987092
Agent [candidate] (1.27 s) : 0, 1269932
Total [candidate] (11.089 s) : 0, 11088831
section iast
Agent [baseline] (1.225 s) : 0, 1224645
Total [baseline] (11.134 s) : 0, 11134117
Agent [candidate] (1.225 s) : 0, 1225232
Total [candidate] (11.177 s) : 0, 11176566
section profiling
Agent [baseline] (1.209 s) : 0, 1209391
Total [baseline] (10.932 s) : 0, 10932458
Agent [candidate] (1.206 s) : 0, 1205850
Total [candidate] (11.001 s) : 0, 11001120
gantt
title petclinic - break down per module: candidate=1.59.0-SNAPSHOT~47d95f97ec, baseline=1.59.0-SNAPSHOT~92c84e28db
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.192 ms) : 0, 1192
crashtracking [candidate] (1.203 ms) : 0, 1203
BytebuddyAgent [baseline] (652.691 ms) : 0, 652691
BytebuddyAgent [candidate] (657.495 ms) : 0, 657495
GlobalTracer [baseline] (283.435 ms) : 0, 283435
GlobalTracer [candidate] (284.931 ms) : 0, 284931
AppSec [baseline] (32.666 ms) : 0, 32666
AppSec [candidate] (33.012 ms) : 0, 33012
Debugger [baseline] (68.569 ms) : 0, 68569
Debugger [candidate] (68.89 ms) : 0, 68890
Remote Config [baseline] (640.296 µs) : 0, 640
Remote Config [candidate] (632.223 µs) : 0, 632
Telemetry [baseline] (9.069 ms) : 0, 9069
Telemetry [candidate] (9.065 ms) : 0, 9065
Flare Poller [baseline] (3.755 ms) : 0, 3755
Flare Poller [candidate] (3.833 ms) : 0, 3833
section appsec
crashtracking [baseline] (1.196 ms) : 0, 1196
crashtracking [candidate] (1.192 ms) : 0, 1192
BytebuddyAgent [baseline] (690.798 ms) : 0, 690798
BytebuddyAgent [candidate] (694.002 ms) : 0, 694002
GlobalTracer [baseline] (258.572 ms) : 0, 258572
GlobalTracer [candidate] (259.291 ms) : 0, 259291
AppSec [baseline] (173.741 ms) : 0, 173741
AppSec [candidate] (174.66 ms) : 0, 174660
Debugger [baseline] (67.783 ms) : 0, 67783
Debugger [candidate] (66.685 ms) : 0, 66685
Remote Config [baseline] (753.506 µs) : 0, 754
Remote Config [candidate] (734.487 µs) : 0, 734
Telemetry [baseline] (9.314 ms) : 0, 9314
Telemetry [candidate] (9.357 ms) : 0, 9357
Flare Poller [baseline] (3.751 ms) : 0, 3751
Flare Poller [candidate] (3.821 ms) : 0, 3821
IAST [baseline] (24.444 ms) : 0, 24444
IAST [candidate] (24.661 ms) : 0, 24661
section iast
crashtracking [baseline] (1.182 ms) : 0, 1182
crashtracking [candidate] (1.183 ms) : 0, 1183
BytebuddyAgent [baseline] (791.5 ms) : 0, 791500
BytebuddyAgent [candidate] (792.198 ms) : 0, 792198
GlobalTracer [baseline] (256.562 ms) : 0, 256562
GlobalTracer [candidate] (256.241 ms) : 0, 256241
AppSec [baseline] (32.577 ms) : 0, 32577
AppSec [candidate] (35.54 ms) : 0, 35540
Debugger [baseline] (67.666 ms) : 0, 67666
Debugger [candidate] (64.73 ms) : 0, 64730
Remote Config [baseline] (550.917 µs) : 0, 551
Remote Config [candidate] (583.967 µs) : 0, 584
Telemetry [baseline] (8.41 ms) : 0, 8410
Telemetry [candidate] (8.546 ms) : 0, 8546
Flare Poller [baseline] (3.591 ms) : 0, 3591
Flare Poller [candidate] (3.518 ms) : 0, 3518
IAST [baseline] (27.073 ms) : 0, 27073
IAST [candidate] (27.157 ms) : 0, 27157
section profiling
crashtracking [baseline] (1.224 ms) : 0, 1224
crashtracking [candidate] (1.227 ms) : 0, 1227
BytebuddyAgent [baseline] (706.14 ms) : 0, 706140
BytebuddyAgent [candidate] (703.813 ms) : 0, 703813
GlobalTracer [baseline] (220.769 ms) : 0, 220769
GlobalTracer [candidate] (220.815 ms) : 0, 220815
AppSec [baseline] (32.218 ms) : 0, 32218
AppSec [candidate] (32.296 ms) : 0, 32296
Debugger [baseline] (68.028 ms) : 0, 68028
Debugger [candidate] (67.561 ms) : 0, 67561
Remote Config [baseline] (657.207 µs) : 0, 657
Remote Config [candidate] (643.578 µs) : 0, 644
Telemetry [baseline] (8.726 ms) : 0, 8726
Telemetry [candidate] (8.731 ms) : 0, 8731
Flare Poller [baseline] (3.665 ms) : 0, 3665
Flare Poller [candidate] (3.678 ms) : 0, 3678
ProfilingAgent [baseline] (97.613 ms) : 0, 97613
ProfilingAgent [candidate] (97.251 ms) : 0, 97251
Profiling [baseline] (98.197 ms) : 0, 98197
Profiling [candidate] (97.826 ms) : 0, 97826
Startup time reports for insecure-bankgantt
title insecure-bank - global startup overhead: candidate=1.59.0-SNAPSHOT~47d95f97ec, baseline=1.59.0-SNAPSHOT~92c84e28db
dateFormat X
axisFormat %s
section tracing
Agent [baseline] (1.089 s) : 0, 1088868
Total [baseline] (8.769 s) : 0, 8768588
Agent [candidate] (1.087 s) : 0, 1086889
Total [candidate] (8.79 s) : 0, 8790263
section iast
Agent [baseline] (1.233 s) : 0, 1233368
Total [baseline] (9.452 s) : 0, 9451734
Agent [candidate] (1.221 s) : 0, 1221254
Total [candidate] (9.328 s) : 0, 9328464
gantt
title insecure-bank - break down per module: candidate=1.59.0-SNAPSHOT~47d95f97ec, baseline=1.59.0-SNAPSHOT~92c84e28db
dateFormat X
axisFormat %s
section tracing
crashtracking [baseline] (1.195 ms) : 0, 1195
crashtracking [candidate] (1.186 ms) : 0, 1186
BytebuddyAgent [baseline] (653.262 ms) : 0, 653262
BytebuddyAgent [candidate] (652.535 ms) : 0, 652535
GlobalTracer [baseline] (284.363 ms) : 0, 284363
GlobalTracer [candidate] (283.14 ms) : 0, 283140
AppSec [baseline] (33.006 ms) : 0, 33006
AppSec [candidate] (32.764 ms) : 0, 32764
Debugger [baseline] (68.1 ms) : 0, 68100
Debugger [candidate] (68.202 ms) : 0, 68202
Remote Config [baseline] (635.758 µs) : 0, 636
Remote Config [candidate] (631.086 µs) : 0, 631
Telemetry [baseline] (8.935 ms) : 0, 8935
Telemetry [candidate] (9.049 ms) : 0, 9049
Flare Poller [baseline] (3.707 ms) : 0, 3707
Flare Poller [candidate] (3.773 ms) : 0, 3773
section iast
crashtracking [baseline] (1.193 ms) : 0, 1193
crashtracking [candidate] (1.184 ms) : 0, 1184
BytebuddyAgent [baseline] (797.749 ms) : 0, 797749
BytebuddyAgent [candidate] (789.398 ms) : 0, 789398
GlobalTracer [baseline] (257.722 ms) : 0, 257722
GlobalTracer [candidate] (255.559 ms) : 0, 255559
AppSec [baseline] (33.504 ms) : 0, 33504
AppSec [candidate] (32.983 ms) : 0, 32983
Debugger [baseline] (67.315 ms) : 0, 67315
Debugger [candidate] (66.717 ms) : 0, 66717
Remote Config [baseline] (599.779 µs) : 0, 600
Remote Config [candidate] (608.054 µs) : 0, 608
Telemetry [baseline] (8.521 ms) : 0, 8521
Telemetry [candidate] (8.554 ms) : 0, 8554
Flare Poller [baseline] (3.639 ms) : 0, 3639
Flare Poller [candidate] (3.481 ms) : 0, 3481
IAST [baseline] (27.43 ms) : 0, 27430
IAST [candidate] (27.268 ms) : 0, 27268
LoadParameters
See matching parameters
SummaryFound 2 performance improvements and 2 performance regressions! Performance is the same for 17 metrics, 15 unstable metrics.
Request duration reports for insecure-bankgantt
title insecure-bank - request duration [CI 0.99] : candidate=1.59.0-SNAPSHOT~47d95f97ec, baseline=1.59.0-SNAPSHOT~92c84e28db
dateFormat X
axisFormat %s
section baseline
no_agent (1.193 ms) : 1182, 1205
. : milestone, 1193,
iast (3.232 ms) : 3187, 3277
. : milestone, 3232,
iast_FULL (5.904 ms) : 5845, 5964
. : milestone, 5904,
iast_GLOBAL (3.593 ms) : 3533, 3653
. : milestone, 3593,
profiling (2.023 ms) : 2005, 2041
. : milestone, 2023,
tracing (1.808 ms) : 1793, 1824
. : milestone, 1808,
section candidate
no_agent (1.211 ms) : 1198, 1224
. : milestone, 1211,
iast (3.357 ms) : 3308, 3405
. : milestone, 3357,
iast_FULL (5.938 ms) : 5877, 5998
. : milestone, 5938,
iast_GLOBAL (3.677 ms) : 3621, 3733
. : milestone, 3677,
profiling (2.093 ms) : 2073, 2112
. : milestone, 2093,
tracing (1.805 ms) : 1790, 1819
. : milestone, 1805,
Request duration reports for petclinicgantt
title petclinic - request duration [CI 0.99] : candidate=1.59.0-SNAPSHOT~47d95f97ec, baseline=1.59.0-SNAPSHOT~92c84e28db
dateFormat X
axisFormat %s
section baseline
no_agent (19.27 ms) : 19078, 19462
. : milestone, 19270,
appsec (18.556 ms) : 18372, 18740
. : milestone, 18556,
code_origins (17.947 ms) : 17769, 18124
. : milestone, 17947,
iast (17.93 ms) : 17751, 18109
. : milestone, 17930,
profiling (18.849 ms) : 18655, 19043
. : milestone, 18849,
tracing (17.529 ms) : 17359, 17699
. : milestone, 17529,
section candidate
no_agent (17.427 ms) : 17253, 17601
. : milestone, 17427,
appsec (18.891 ms) : 18702, 19081
. : milestone, 18891,
code_origins (17.802 ms) : 17625, 17979
. : milestone, 17802,
iast (17.934 ms) : 17754, 18114
. : milestone, 17934,
profiling (19.765 ms) : 19563, 19966
. : milestone, 19765,
tracing (17.744 ms) : 17569, 17919
. : milestone, 17744,
DacapoParameters
See matching parameters
SummaryFound 1 performance improvements and 0 performance regressions! Performance is the same for 11 metrics, 0 unstable metrics.
Execution time for biojavagantt
title biojava - execution time [CI 0.99] : candidate=1.59.0-SNAPSHOT~47d95f97ec, baseline=1.59.0-SNAPSHOT~92c84e28db
dateFormat X
axisFormat %s
section baseline
no_agent (15.04 s) : 15040000, 15040000
. : milestone, 15040000,
appsec (14.621 s) : 14621000, 14621000
. : milestone, 14621000,
iast (18.241 s) : 18241000, 18241000
. : milestone, 18241000,
iast_GLOBAL (18.073 s) : 18073000, 18073000
. : milestone, 18073000,
profiling (14.96 s) : 14960000, 14960000
. : milestone, 14960000,
tracing (14.479 s) : 14479000, 14479000
. : milestone, 14479000,
section candidate
no_agent (15.046 s) : 15046000, 15046000
. : milestone, 15046000,
appsec (14.496 s) : 14496000, 14496000
. : milestone, 14496000,
iast (18.009 s) : 18009000, 18009000
. : milestone, 18009000,
iast_GLOBAL (17.747 s) : 17747000, 17747000
. : milestone, 17747000,
profiling (14.963 s) : 14963000, 14963000
. : milestone, 14963000,
tracing (14.686 s) : 14686000, 14686000
. : milestone, 14686000,
Execution time for tomcatgantt
title tomcat - execution time [CI 0.99] : candidate=1.59.0-SNAPSHOT~47d95f97ec, baseline=1.59.0-SNAPSHOT~92c84e28db
dateFormat X
axisFormat %s
section baseline
no_agent (1.475 ms) : 1463, 1486
. : milestone, 1475,
appsec (3.729 ms) : 3508, 3950
. : milestone, 3729,
iast (2.21 ms) : 2146, 2274
. : milestone, 2210,
iast_GLOBAL (2.259 ms) : 2194, 2323
. : milestone, 2259,
profiling (2.072 ms) : 2020, 2125
. : milestone, 2072,
tracing (2.049 ms) : 1998, 2100
. : milestone, 2049,
section candidate
no_agent (1.482 ms) : 1471, 1494
. : milestone, 1482,
appsec (2.536 ms) : 2481, 2591
. : milestone, 2536,
iast (2.22 ms) : 2155, 2285
. : milestone, 2220,
iast_GLOBAL (2.257 ms) : 2191, 2322
. : milestone, 2257,
profiling (2.094 ms) : 2040, 2149
. : milestone, 2094,
tracing (2.044 ms) : 1993, 2096
. : milestone, 2044,
|
| } | ||
|
|
||
| @Override | ||
| protected String service() { |
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.
there is no need to override it since it's null on the base method
| */ | ||
| public AgentSpan onLocalConnection(final AgentSpan span, final InetSocketAddress localAddr) { | ||
| if (localAddr != null && localAddr.getAddress() != null) { | ||
| span.setTag("network.local.address", localAddr.getAddress().getHostAddress()); |
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.
thanks for having used otel attribute names
amarziali
left a comment
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.
Looks good. Thanks for that addition. I left few comments for improvement
| final String tranName = spec.getTranName(); | ||
| final String tpnName = spec.getTPNName(); | ||
|
|
||
| span.setResourceName(interactionVerb + " " + functionName); |
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.
as a future improvement this might be cached if the cardinality is not too high
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.
So far, in my experience, the cardinality has 1 per service (with the note that we tend to do microservices).
| final int callDepth = CallDepthThreadLocalMap.getCallDepth(ECIInteraction.class); | ||
| if (callDepth > 0) { | ||
| // Inside execute() - add connection tags to the existing span instead of creating new one | ||
| final AgentSpan parentSpan = activeSpan(); |
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.
This is a generally strong assumption. A way to make sure that the right span is always tracked is to use the context store here
ValentinZakharov
left a comment
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
bedb163 to
d3372cd
Compare
|
Heads-up: I noticed while testing that I'm not seeing the I wouldn't suggest blocking/delaying the merge on this, but there's a chance I might have a tweak soon if I figure out what's going on. |
No worries just added a label to say that we could wait a bit still targeting next release if possible |
This PR mirrors the changes from the original community contribution to enable CI testing with maintainer privileges.
Original PR: #10269
Original Author: @deejgregor
Original Branch: deejgregor/dd-trace-java:feature-cics-tracing
Closes #10269
This is an automated mirror created to run CI checks. See tooling/mirror-community-pull-request.sh for details.