Search code examples
mainframew3copen-telemetryapmopen-telemetry-collector

Opentelemetry on Mainframe


I have a Java application which runs on Linux and makes call into Mainframe (CICS). My goal is to pass unique GUIDs to trace the path taken by my transactions in various systems and collect the traces and show in APM solution. I wish to be APM vendor agnostic.

  1. I am not sure how open-telemetry applies to my use case on Mainframe (APIS, SDK, Exporters, W3C context passing).
  2. Do I need to implement an exporter to opentelemetry-collector for the traces I collect using proprietary mechanism so that it remain APM vendor agnostic?

Basically I am looking for ways to implement tracing on Mainframe APM vendor agnostic way.


Solution

  • It depends on what you're interested in, really.

    • Do you want to capture specific timing information, or add attributes to spans that are only available in the mainframe process? In that case, yes, you'd need to get that data out somewhere and it might be tricky to write an OpenTelemetry SDK implementation for CICS. However, you might not have to do that - if the information you care about can come from a sidechannel in the response, you could add that information to the calling span in your Java service as it handles the response.

    • If the mainframe service is the terminal point of your request (i.e., no other interesting operations happen after the request enters the mainframe) then you probably don't need to propagate context into it, and could just wrap the request to the mainframe in a span to represent the work being done there, the result of those calls, etc.

    • If the mainframe is not the terminal point of your request, consider a tracing proxy that can be placed between incoming/outgoing requests from the mainframe. This proxy could hold the trace context, and propagate it to whatever the next service is, you would just need it to intercept incoming/outgoing requests and have a lookup table to associate the correct trace context with the correct requests.

    Hopefully that's helpful!