Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What Does This Do
Adds tracing for CICS calls made to an IBM CICS Transaction Gateway (CTG).
Motivation
Outbound client calls to CICS functions are valuable to be traced similar to outbound REST calls or other RPC calls. This adds basic tracing (but not context propagation) to these calls, in addition to setting a peer.hostname to allow the downstream CICS Transaction Gateway (CTG) host to be shown as an inferred service.
Additional Notes
Methods instrumented
ECIInteraction.execute
Instruments the entry point for CICS
calls via IBM's javax.resource.cci.Interaction implementation,
creating
cics.executespan and recording a few tags.A few tags from the
OTEL RPC semantic conventions
are added, as well.
JavaGatewayInstrumentation.flow
Records the
peer.*tags onthe
cics.executespan created above, or if it doesn't exist,creates a new
gateway.flowspan.Once a connection is made, some the peer and local IP address and port are recorded.
Datadog does not normally record the the local side of
network connection details, but this was added to assist with debugging network issues and as an example of how to add this data.
Other notes
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.
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]