To enable OpenTelemetry (OTel) span data collection in SMF, you must enable SMF, configure it to recognize the records, give it permission to write the OTel span records.
About this task
Db2 produces OTel span data records by using SMF extended record type 1161, subtype 1.
Similarly, IBM® MQ uses SMF type 1158, CICS uses SMF type 1159, and IMS uses SMF type 1160.
To enable OTel span record collection in SMF, complete the following steps:
- Enable SMF log streams on your z/OS® system, and configure it to recognize the extended records for OTel span data.
For example, the following partial example SMFPRMxx PARMLIB member shows the OTel SMF record types with the default 2G in-memory buffers.
.
.
.
INMEM(IFASMF.OTEL.T1158,TYPE(1158)) /* WRITE MQ OTEL 1158 */
INMEM(IFASMF.OTEL.T1159,TYPE(1159)) /* WRITE CICS OTEL 1159 */
INMEM(IFASMF.OTEL.T1160,TYPE(1160)) /* WRITE IMS OTEL 1160 */
INMEM(IFASMF.OTEL.T1161,TYPE(1161)) /* WRITE DB2 OTEL 1161 */
RECORDING(LOGSTREAM)
.
.
.
/* ADDED EXTENDED TYPES 1158 (MQ), 1159 (CICS), 1160 (IMS) */
/* and 1161 (DB2) FOR z/OS OTEL SUPPORT */
SYS(TYPE(0:98,100:255,1158:1161),
EXITS(…)
.
.
.
- Give permission for Db2 to write OTel span records to SMF. The following statements create the RACF IFA Facility resource profile for Db2 and PERMIT the Db2 started task userid control access.
RDEFINE FACILITY IFA.IFASMF.OTEL.T1161 UACC(NONE)
PERMIT IFA.IFASMF.OTEL.T1161 CLASS(FACILITY) -
ID(SYSDSP) ACCESS(CONTROL)
- Start Db2 accounting traces class 1 and class 2. For more information, see Accounting trace.