The EXTRACT_OTEL call

6.3 beta Applies to 6.3 and CICS TS beta.

The EXTRACT_OTEL call returns the OpenTelemetry trace parent information that is associated with the current task to the exit program.

EXTRACT_OTEL

DFHMNOTX [CALL,]
[CLEAR,]
[IN,
FUNCTION(EXTRACT_OTEL),
[OUT,
[OUT,
[TRACEID(name32),]
[PARENTID(name16),]
[SPANID(name16),]
[VERSION(name2),]
[FLAG(name2),]
RESPONSE(name1 | *),
REASON(name1 | *)]

This command is threadsafe.

Important

There is a restriction in using the XPI early during initialization. Do not start exit programs that use the EXTRACT_OTEL function until the second phase of the PLTPI. For further information about the PLTPI, refer to Writing initialization and shutdown programs.

TRACEID(name32)
Returns the 32-byte OTel trace id for the task.
PARENTID(name16)
Returns the 16-byte OTel parent id for the task.
SPANID(name16)
Returns the 16-byte OTel span id for the task.
VERSION(name2)
Returns the 2-byte OTel version number for the task.
FLAG(name2)
Returns the 2-byte OTel flag for the task.

RESPONSE and REASON values for EXTRACT_OTEL

RESPONSE REASON
OK None
EXCEPTION NO_OTEL
DISASTER None
INVALID None
KERNERROR None
PURGED None
Note:
  1. For more detail, refer to the explanation of RESPONSE and REASON in Making an XPI call.
  2. ‘NO_OTEL’ means that no OTel data is associated with the current task.