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

How to monitor asynchronous External API call with non http based protocol?

kaarel_kargu
Newcomer

Hi,

our java application communicates over a custom binary protocol with a external service where is no agent installed. The external API is called by our application in a asynchronous way.

We have 3 methods. First one that sends out the request. second one that is polling for the status of the sent request and the last one will accept the response for the call made by the first method.

Question:

Is it possible to measure the duration of this call(we can instrument our application with appMon agent)?

Can we use ADK to achieve it?

If its not possible to get this working, can we use Observed tiers feature for this, to make external API visible on transaction flow dashlet?

2 REPLIES 2

pahofmann
Leader

This is quite interesting. It should be possible with the adk, with the tagging adk you will be able to get the link between caller and callee, the Documentation for it is very good: https://www.dynatrace.com/support/doc/appmon/integrations-and-extensions/development-kits/agent-development-kit-adk/tagging-adk-for-java/

I had a similar problem at a customer with a .NET application which is executing a call on one thread, then kills that thread and accepts the response on another thread, once it recevies it.

c_schwarzbauer
Dynatrace Champion
Dynatrace Champion

hi Kareel,

so if I understand you correctly, you want to monitor the time of the whole async call, meaning from request sent to response received, correct?

so what you would ideally need would be a functionality to mark calls as external over multiple methods, calculating the response time as a difference between the last method and the first, right? unfortunately such functionality does not exist right now.

so let's go through your options:

you could use the ADK, yes. but just using the Java Tagging ADK will only help you if you have an Agent or an ADK on the other side of the external call. if that's possible you could measure the time it takes on the server-side, but still not on the client-side. it's not possible with the Tagging ADKs to create PurePaths nodes or measure times right now.

you can use the external API services to mark those methods as external calls. but still you can only define one method as external call, not multiple ones. so you would get it as external calls in the Transaction Flow, but still the time measurement would not be correct.

the only meaningful way that would occur to me would be if you can find a method on the client-side which is basically a parent around the request sending and response receiving. this method could be used for an external API call then.

however, if you can't find such a method, I don't have any other options on my mind.

HTH, Christian