Skip to content

Conversation

@deejgregor
Copy link
Contributor

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.execute span and recording a few tags.

A few tags from the
OTEL RPC semantic conventions
are added, as well.

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.

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

Jira ticket: [PROJ-IDENT]

- 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.
@deejgregor deejgregor requested review from a team as code owners December 26, 2025 09:52
@deejgregor deejgregor requested a review from mhlidd December 26, 2025 09:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant