Async Request Monitoring


Asynchronous programming is a non-blocking method that allows your application to start a new task without pausing or waiting for ongoing tasks to end. This gives Asynchronous programming a clear edge over Synchronous programming, which is much slower in comparison, as the Synchronous method needs to wait for an ongoing task to finish before starting a new one. The Synchronous programming model also typically executes programming tasks in a specific order. On the other hand, Asynchronous programming treats its tasks as entirely independent of one another in terms of execution and initialization. As asynchronous tasks are not executed in sequential order, the server's full processing power can be utilized more efficiently.

Our APM Insight Java agent supports asynchronous transaction monitoring for the following components: Spring @Async annotation, Apache HttpAsyncClient, AsyncHttpClient, and CompletableFuture.

Use Trace Details to identify Asynchronous calls

The trace details captured by APM Insight provide visibility into various asynchronous tasks that are executed concurrently across your environment.

Follow the steps given below to view the trace details of the application:

  1. Log in to your Applications Manager tool.
  2. Go to APM → your Java application.
  3. Click the Traces tab, then click the required trace.
  4. Select the Trace Details tab.

The following are the metrics available for asynchronous calls:

  • Async call status: Completed, Failed, Cancelled
  • Async thread information: Thread name, Thread ID, CPU time, Memory allocated
  • Threadpool wait time: The waiting time of an async task for a new thread assignment.
  • Wait time in caller thread: The waiting time of the main thread for the async job to finish (if join() is invoked).

Response time in Async calls

The response time of asynchronous Java applications is often less than the total transaction time. This is because asynchronous models do not have to wait for all ongoing methods to finish before initiating a new one. Since its tasks can be executed parallelly, the application can make better use of its limited resources and time, and process things faster.