Quick-start configuration of API ML observability
Quick-start configuration of API ML observability
To enable observability in the Zowe API Mediation Layer (API ML), you must configure the OpenTelemetry (OTel) SDK to capture telemetry signals and enrich them with resource attributes. This process ensures that your mainframe performance and health data are accurately identified and correlated within your observability backend.
Prerequisites
- Administrative access to your
zowe.yamlconfiguration file. - Access to an OTel Collector. An OTel Collector is a vendor-agnostic proxy that receives, processes, and exports your telemetry data to an observability backend or visualization tool (such as Prometheus, Grafana, or Jaeger).
For more information about the OTel collector, see Collector in the OpenTelemetry documentation. - The URL of your OTel Collector. API ML can export telemetry data to the OTel Collector only when the collector URL (host and port) is specified in the API ML configuration. For procedural details, see Specify the OTel Collector URL.
Quick-start configuration of API ML observability overview
Quick-start configuration of API ML observability consists of the following steps:
1. Define service identity
2. Configure zowe.yaml
3. Restart Zowe
4. Verify your configuration
1. Define service identity
Establish the logical identity of your API ML instance. This step ensures that your monitoring tool can group high-availability instances together while still allowing you to pinpoint specific address spaces.
Services are identified via the service.name, service.namespace, and service.instance.id properties. Together, these attributes create a unique identity for API ML instances across your enterprise. You define service.name and service.namespace in zowe.yaml, as described in 2. Configure zowe.yaml. Note that service.instance.id is automatically generated via hostname:serviceId:port and is not customizable.
In complex mainframe environments, you may have multiple API ML installations across different Sysplexes or data centers. To monitor these effectively, you must balance Logical Grouping (viewing all API ML traffic as one functional unit) with Instance Differentiation (identifying exactly which specific Address Space is experiencing an issue).
OpenTelemetry uses a three-tier approach to define service identity:
-
service.name (The Service)
Identifies the logical name of the service. This property value should be identical for all instances across your entire organization that perform the same function (for example,zowe-apiml). Expected to be globally unique ifnamespaceis not defined. Configuration of this attribute is optional. If this attribute is omitted, a default name is generated automatically in the formatapiml:<sysplex|hostname>:<port>. -
service.namespace (The Environment/Site)
Groups services into logical sets. Use this property value to distinguish between different installations, such as sysplex-a vs. sysplex-b, or north-datacenter vs. south-datacenter.service.nameis expected to be unique within the samenamespace. Configuration of this attribute is optional. -
service.instance.id (The Unique Instance)
Identifies a specific running process or Address Space. This attribute is automatically generated viahostname:serviceId:port.
i. Choose a service name.
Decide on one service.name value, such as zowe-apiml, to share across all instances that perform the same function.
ii. Choose a service namespace.
Decide on a service.namespace value for each logical boundary, such as a data center, sysplex, or business unit.
iii. Confirm attribute requirements.
Ensure these identifiers align with the grouping and filtering logic of your backend.
In step 2, set these values in zowe.yaml. In zowe.yaml, service.name and service.namespace are the properties telemetry.service.name and telemetry.service.namespace under components.apiml.
2. Configure zowe.yaml
Under components.apiml.telemetry in zowe.yaml, define the following properties to enable telemetry collection and send it to your OpenTelemetry collector:
-
enabled
Specifies whether OpenTelemetry data collection and exporting is active for API ML. Set totrueto enable observability. Restart Zowe after you change this value. -
exporter.endpoint
The URL of your OpenTelemetry collector, to which API ML sends the telemetry signals.
Example:https://otel-collector.your.domain:4318 -
exporter.protocol
The transport protocol that API ML uses to send data to the collector.
Default:http/protobuf -
service.name
The logical name that identifies this service in your observability backend (for example,zowe-apiml). This property is optional. If you omit it, API ML generates a name in the formatapiml:<sysplex|hostname>:<port>. -
service.namespace
The logical group that the service belongs to, such as a sysplex or data center (for example,sysplex-a). This property is optional.
The following example shows these properties in zowe.yaml:
Specify the OTel Collector URL
API ML can export telemetry data only to a Collector whose URL is specified in your zowe.yaml file. Follow these steps to specify the OTel Collector URL:
-
Obtain the OTel Collector host name and the port that matches your export protocol from the OTel Collector administrator. By default, the OTLP/HTTP protocol uses port
4318. -
In your
zowe.yamlfile, setcomponents.apiml.telemetry.exporter.endpointto the OTel Collector URL, and setcomponents.apiml.telemetry.exporter.protocolto the matching protocol, together with the service identity that you defined in 1. Define service identity:components:apiml:telemetry:enabled: trueexporter:endpoint: "https://otel-collector.your.domain:4318"protocol: "http/protobuf"service:name: "<your-service-name>" # example: "zowe-apiml"namespace: "<your-service-namespace>" # example: "sysplex-a"
-
To customize automatically discovered attributes, see the full
zowe.yamlconfiguration for API ML observability in the article Advanced configuration of API ML Observability with an OTel Collector. Note that using the values generated through the automation is the preferred method. -
If your collector is working and you have defined the service identity and correctly configured the zowe.yaml file, the integration is fully functional. API Mediation Layer automatically discovers the
service.instance.idand existing z/OS system attributes defined in zowe.yaml. If you choose to manually override these automated values or define custom environment labels, you can perform the remaining optional steps in this procedure. -
See Advanced configuration of API ML Observability with an OTel Collector to perform the following configurations:
- Customize automatically discovered attributes with an example of full zowe.yaml configuration for API ML observability. Note that using the values generated through the automation is the preferred method.
- Configure a secure (HTTPS) connection to your collector, or to change exporter transport protocols.
3. Restart Zowe
After you save zowe.yaml, the configuration is not active yet. API ML reads these telemetry settings in start.sh and initializes the OpenTelemetry SDK only during startup. An API ML instance that is already running continues with telemetry disabled until you restart it.
Restart Zowe so that API ML picks up the telemetry settings.
After the restart, API ML initializes the OpenTelemetry SDK with the settings from zowe.yaml, and API ML observability is enabled.
4. Verify your configuration
To ensure your configuration is working as expected, perform the following checks:
-
Monitor your observability backend.
Access your visualization tool (such as Prometheus, Grafana, or Jaeger) to confirm that telemetry signals from the API ML components are being received, parsed, and visualized correctly. -
Review API ML Error Logs.
If telemetry signals are not flowing through your collector, review the API ML service logs. These logs provide details regarding connectivity issues, incorrect endpoints, or authentication errors between Zowe and the OpenTelemetry collector.
Next steps
-
Review your observability output
To verify that telemetry is flowing, configure an exporter in your OTel Collector to route the signals to an observability backend (such as Grafana, Jaeger, or Prometheus). For details on how to route this data, see the heading Exporters in the OpenTelemetry documentation. -
Using your OpenTelemetry metrics
For details about API ML telemetry signals and how to use API ML OTel signals to monitor and assess security and routing activity of your z/OS-based service-based infrastructure, see the articles in the section Using API ML observability . -
Review Sample Output
To review sample output for API ML OpenTelemetry, see Sample Output from API ML OpenTelemetry.