Async Calls, Redis and Neo4j support

With the advent of Reactive Applications, more and more applications are performing work on separate threads than the one handling the request. With this in mind, we have added support for Asynchronous calls starting from DripStat Agent 6.1.7.

How does it work?

If you do work in separate thread, DripStat will now capture that data and report it in every relevant view in the Dashboard.

For example, here is a method that has Spring Framework’s @Async annotation. It will be executed on a separate thread when called. This method’s implementation makes a call to an external REST Service.

@Async
public Future> fetchTxnChildrenStatsAsync(DataReadContext rc)
{
    List statsList = fetchTxnChildrenStats(rc);
    return new AsyncResult<>(statsList);
}

For examples below, we assume this method is called inside a transaction.

Application Overview

DripStat will now detect that this asynchronous method was called and change the view in Dashboard to reflect that. The Application Overview view shows a new Async Calls row which shows the time spent calling external Rest Services asynchronously.

Transactions View

The Transactions view also shows an Async Calls row. It shows the exact Rest Service that was called. There is even a table listing the various Asynchronous segments.

REST Services view

Looking at the REST Services tab, the Average Response Time and Throughput take into account the asynchronous calls to the REST service. There is now an ‘Top Async Callers’ graph, in addition to the ‘Top Callers’.

It is very possible for a Transaction to be in both ‘Top (Synchronous) Callers’ and ‘Top Async Callers’, since it can be making both Synchronous and Asynchronous calls to a REST service.

Database Views

All of the above for REST Services view also applies to each of the Database views. You will be able to see asynchronous calls made to the database, and see its async callers in the respective database view.

Current Async Implementation Support and Limitations

Agent 6.1.7 supports:

  • Spring Framework’s @Async annotation
  • Anything that happens inside tasks submitted to Spring’s FutureTask
  • Spring’s AsyncRestTemplate
  • Cassandra DataStax driver’s executeAsync() method

We will be adding support for more Asynchronous libraries very shortly. Keep checking this blog.

Redis support

Spring Data Redis and Jedis are now supported. If you use Spring Data Redis, then no matter what Redis library you use, its timing will be measured. 

Neo4j support

Neo4j is now supported.

Currently both Neo4j and Redis support will only show the time spent in each layer in all existing views, e.g. Application Overview and Transactions view.

Whats Next

We are in the process of reworking our Databases view to support many different databases without cluttering the top navigation. Once that is done, you will also see a separate tab for Redis and Neo4j.

We will also soon be adding more detailed views for Redis and Neo4j showing statement level stats.

Feedback

In our public Trello, do comment next to the specific framework as to what you would like to see next, and also do suggest new frameworks to support!

Keep looking at this blog every day. We will be making very frequent updates to DripStat now!

Show Comments