I am attempting to create a Business Transaction to monitor our JMS MessageListeners as independent entities. We have 2 independent message listeners that handle messages in turn. The message flow is as follows:
MessageProducer.send() ---- async ----> MessageListener1.onMessage() ---- async ----> MessageListener2.onMessage()
What I am seeing is that the PurePath of MessageListener1.onMessage() seems to include the PurePath of MessageListener2.onMessage() under the asynchronous invocation, and does not have it's own PurePath. Therefore, when I try to set up measures on the class/method invocation, I am only ever seeing the invocation of MessageListener1. Is there a way to ensure that the PurePaths are captured independently? Or another way to split these? I attempted to split by Message Destination with no luck.
My ultimate goal is to be able to track the performance of each onMessage call independently.
You can capture method execution data for different methods by using a specific trick.
Build a measure which splits on class name (i.e., using the Methods - Classname Value measure template). For example, you could leave the class name blank and just set the method name to "onMessage" if that was specific enough. If you like, you can use the "Transformation Regex" to pull out the part of the class name you want.
In a new business transaction, add the measure to both splitting and result measures. Still in the business transaction, open up the measure and go to the Details tab. Scroll to the bottom:
Enable the grouping measurement checkbox (as shown) and select whatever method measure you want the BT to return.
The trick is that although it looks from the BT definition that the splitting measure is what's returned, the actual value of the BT result measure is set by the pull-down. Also, although this is a PP BT, the result measure is given for individual method calls.
Thank you for the suggestion, Graeme. Unfortunately, it is still not splitting properly. I created a measure as suggested:
I filtered based on the package structure for the specific MessageListeners I'm interested in. I then set up the BT as such:
But I still see only the first listener when viewing the BT dashboard:
If I drill into the PurePath, I see the async invocation of the other class:
Is there any way to break these into two independent PurePaths instead of trying to split them within a BT?
The measure looks fine, but you need to add it to the splitting and results sections of the BT, not the filter section.
Also, you need to clear the "only analyze first method occurrence per PurePath" check box.
I'm assuming you made the change on the details tab of the measure.
Thanks for pointing out that mix-up. The splitting is working properly now, however it looks like it is only accounting for the JMS message delivery time and not the actual execution time of the onMessage method.
The second message listener (PISendMessage) should actually have a higher execution time, as it typically takes twice as long as the first one. But the average execution time is only 8ms. So I am guessing this is only the overhead of the message delivery through our JMS provider itself.
Plus I noticed that all other metrics are still displaying the same for both splittings (PurePath response time, Database Time, Etc...). So I am not sure if this solution will work for our needs as we'd ideally like to have all of the data tracked independently.
i think you should stop tracking full purepaths
disable jms tagging and you will have that ... but then you wont have full purepath that is another inconvenient.
I think it should exist some option to track results by partial purepaths