Your data. Anywhere you go.

New Relic for iOS or Android


Download on the App Store    Android App on Google play


New Relic Insights App for iOS


Download on the App Store


Learn more

Close icon

Feature Idea: Support MongoDB Async Driver on Java

async
java
mongo
feature-idea
mongodb

#1

The recent release of the5.2.0 Java driver adds instrumentation for mongo-java-driver clients created using the MongoClients class. It mentions that you do not currently support the asynchronous drivers. Despite this, async MongoDB calls are still being kind-of instrumented, but very clearly wrong.

Because of this, when upgrading to 5.2.0 our transaction time on a service which uses the async java driver looks like this:

The only option we have right now is to disable MongoDB instrumentation altogether. It would be great to have support for the async driver as database timings are very important to our app.

Thanks


New Relic Edit

  • I want this too
  • I have more info to share (reply below)
  • I have a solution for this

0 voters

We take feature ideas seriously and our product managers review every one when plotting their roadmaps. However, there is no guarantee this feature will be implemented. This post ensures the idea is put on the table and discussed though. So please vote and share your extra details with our team.


#2

Hey @clayton.sayer - Thanks for posting your Feature Idea here - I’ll go ahead and make sure that’s filed internally - I have added a poll to your post too for others to vote on here. :slight_smile:


Mongo processing time is very wrong on newest Agent 5.2.0
#3

Will post perhaps more appropriately here: the lack of support for the MongoDB Async Driver in the Java Agent is causing OOM issues in our applications. The New Relic Java agent is queuing transactions who’s Mongo segments have not been closed. We would love to hear about a solution for this.

I see that Segments#endAsync support was added to Segments in version 5.5.0 so it should now be possible to add this to the Mongo driver instrumentation? This works with our own custom Segments to sidestep this issue and give us visibility for the reactive (async) driver.


#4

Hi y’all, I’m a software engineer and technical product manager on the Java agent team.

Thank for bringing this to our attention. I wanted to let you know that we’ll be working on supporting the mongodb-driver-reactivestreams and mongodb-driver-async drivers out of the box in the near future.

In addition, the upcoming release of the Java agent will include changes to prevent the mongodb-7 instrumentation from applying when either the mongodb-driver-reactivestreams or mongodb-driver-async drivers on the classpath. This will resolve the issue with Segment timeouts, memory overhead, incorrect transaction times and make it so that the custom configuration to disable the instrumentation module will no longer be necessary.

Thanks again!