cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

This product reached the end of support date on March 31, 2021.

Custom messaging tagging

bruce_garner
Participant

I have a third party library which uses a messaging system (imagine a home grown JMS system)

Basically, request threads generate RequestMessage objects which one thread puts into a message pool and a waiting Thread in various thread pools then read, process and return a ResponseMessage into the pool for the waiting thread to pick up.

Any idea if I can do this in Dynatrace easily? I'm not sure if I need the customer Tagging ADK or if I'm going to need some sort of AOP to add something to the RequestMessage call when it's created for the processing thread to extract when it accepts the RequestMessage.

Any hints gladly accepted.

4 REPLIES 4

Joe_Hoffman
Dynatrace Leader
Dynatrace Leader

Bruce,

This is possibly do-able, depending on a few factors.

1) If the messaging system is built upon JMS, it should just work automagically. But sounds like it's truly home grown down to the roots.

2) You could capture the message processsor activities as a separate PP and still get lots of value, although this would not glue the Producer and Consumer of the message together as a single PP. I just offer this as an alternative as the effort required to glue them together may just not be worth it. That is something you'll have to determine based on learning more about what it will take to glue them, AND the business value of having them glued. (I Hope that makes sense).

3) To glue them together you'll have to pass a tag along thru the message payload. The JMS protocol supports this "add-on" concept very nicely in the specification, i'm not sure your home-grown solution will accomodate the tag. If it does not, then glueing them will be very hard.

4) If it supports the additional payload concept, then you'll want to explore the Tagging ADK. How you inject the tagging ADK calls will likely be AOP based as it does not sound like you have the sourcecode. But whether you use AOP or manual source modifications, the Tagging ADK will be the tool to get a tag, and retrieve/report the tag at the other end of the remoting protocol. Even if you have the source, AOP is still a clean injection technique to avoid source modifications (assuming you're comfortable with AOP techniques).

HTH

joe Hoffman

Thanks Joe.

You've basically confirmed my thinking up to this point.

1. Yup - truly home grown. I would add that it only pass messages within a single JVM - so I don't have to worry about objects passing out of the JVM. (See 3)

2. Already done.

3/4. Nope - no add-on concept in their messaging system. I was hoping Dynatrace might be able (via it's agent) to add a field to the message class, and then populate that field on the 'send' from the producer and then extract the field on the 'receive' from the consumer. From a conversation about 2 years ago the Dynatrace person (who's name I can't remember) seemed to think that this could be done with some custom Dynatrace configuration (not sure if they meant AOP and tagging ADK or not). I was hoping to see if anyone knew anything more as to if Dynatrace could support all of this.

Bruce

If each message has a unique message ID, you could use custom tagging. The way it works is you associate the message ID with the PurePath at the producer end of the PurePath, and once again at the consumer end of the PurePath.

This way, you don't have to modify the messages.

Joe_Hoffman
Dynatrace Leader
Dynatrace Leader

The tagging ADK does not provide the mechanism to transport the tag across the protocol. The Tagging ADK only provides the mechanism to get a tag and then return that tag on the other side of a remoting protocol, but getting the tag to the other side is left up to the implementers. If you know the data structure, (which you could determine by introspection), you should be able to use AOP to possibly modify the payload to transport the tag.