Zhi Li(
bjlizhi@cn.ibm.com) - Developer for Instana Integration
Li Jian Wang(wlijian@cn.ibm.com) - Tech lead for Instana Integration
Instana was recently named a Leader in 2022 Gartner® Magic Quadrant™ for Application Performance Monitoring(APM) and Observability. Instana boosts functionality and observability in your enterprise APM, improves APM and accelerates CI/CD pipelines, no matter where applications reside — public cloud, private cloud, hybrid cloud, on premises, IBM Z® and more. With Instana, you can combine APM with automation capabilities and distributed tracing to deploy on premise or as a SaaS solution.
Apache RocketMQ is a distributed messaging and streaming platform with low latency, high performance and reliability, trillion-level capacity and flexible scalability. Today, more than 100 companies are using the open-source version of RocketMQ in their business.
Instana now has the capability to monitor Apache RocketMQ as technology preview. This blog explains how to enable Apache RocketMQ monitoring with Instana, including the required configuration, the collected metrics and automatic tracing.
Enabling Apache RocketMQ sensor
Instana supports monitoring multiple RocketMQ clusters with a single Instana agent. You can enable Apache RocketMQ sensor by editing the agent configuration yaml file <agentinstall_dir>/etc/instana/configuration.yaml.
The example in this screenshot shows that the Instana agent is configured with two RocketMQ name server clusters. Before you start the configuration, you need to get related configuration information from your RocketMQ administrator, including name of server address, availability zone information for grouping your RocketMQ clusters, whether ACL is enabled for the RocketMQ and the related keys for accessing Access Control List (ACL) enabled RocketMQ. In this example, the second cluster has ACL-enabled RocketMQ.
After you save the configuration changes, the Instana agent will start to monitor your RocketMQ cluster.
Monitoring RocketMQ on infrastructure map
In the Instana Infrastructure view, you can monitor your RocketMQ cluster by filtering with the string entity.rocketmq.broker.name:*
as follows:
In the infrastructure map, the RocketMQ clusters are grouped into two named zones as in the configuration example of the first section. There are one or more pillars in each zone, each pillar represents a broker in the RocketMQ cluster. In this example, rocketmqzone contains four brokers of the RocketMQ cluster, two masters and two slaves.
Click the broker pillar, you can view the broker properties, including which RocketMQ cluster the broker belongs to, ID, Boot time, version, etc.
Instana can now collect only key metrics for RocketMQ brokers and topics. More metrics can be added based on requirements from customers.
The cluster dashboard shows a list of brokers and topics for the given cluster as follows:
The broker dashboard shows metrics of selected broker as follows:
The topic dashboard shows metrics for selected topic as follows:
For more detailed metric information, see Monitoring Apache RocketMQ Technology Preview.
Autotracing RocketMQ requests
First, you need to enable Java trace in the Instana agent configuration file<agentinstall_dir>/etc/instana/configuration.yaml as follows:
The Java sensor provides automatic code instrumentation for the following methods from RocketMq SDK:
org.apache.rocketmq.client.producer.DefaultMQProducer.send
org.apache.rocketmq.client.producer.TransactionMQProducer.sendMessageInTransaction
org.apache.rocketmq.client.consumer.listener.MessageListener.consumeMessage (auto-instrumentation for both concurrent consumption and order consumption)
org.apache.rocketmq.client.impl.consumer.DefaultMQPullConsumerImpl.pullSyncImpl
org.apache.rocketmq.client.consumer.PullCallback.onSuccess
You can see traces on the Instana UI when these methods are being called by your Java application.
Summary
This blog explains how to enable Apache RocketMQ monitoring with Instana, including the required configuration, the collected metrics and automatic tracing. For more details, see Monitoring Apache RocketMQ Technology Preview.