MQ Tracing with Instana
In this paper, I will explore how we use Instana to trace a Java Spring Boot application, down to its JMS messaging, and further down to the underlying Queue manager (IBM MQ).
The environment is Kubernetes based. All the components including the application, MQ, Instana agent are running on the OpenShift container platform (OCP).
The Spring Boot Application
I use the demo springboot application as the base, which can be cloned from this repo. We use JMS to talk to to MQ. The following utilities is developed to send IBM MQ message through JMS.
In the method of JmsConnectionFactory creation, get all the configuration settings from the environment variables, including the MQ hostname, port, queue manager name, channel and so on. As we running on kubernetes, I use certificate’s common name to map to the MQ’s user instead of the common user/password pairs. In the function, we load the keystore for its certificate and use that for the TLS communication and for the authentication and authorization purpose. (refer to my last medium paper for more detais)