Mongo driver 4.x is not supported on Java

Kibana version:7.9

Elasticsearch version:7.9

APM Server version:7.9

APM Agent language and version:Java - 1.18.0

Browser version:Firefox 80.0.1

Original install method (e.g. download page, yum, deb, from source, etc.) and version: Maven

Fresh install or upgraded from other version? Fresh install

Is there anything special in your setup? None

Description of the problem including expected versus actual behavior. Please include screenshots (if relevant):
The base interface from MongoDB driver (com.mongodb.connection.Connection) was deleted on version 4.x of the driver, and so the APM for Mongo is not working in newer drivers.

APM agent: https://github.com/elastic/apm-agent-java/blob/master/apm-agent-plugins/apm-mongoclient-plugin/src/main/java/co/elastic/apm/agent/mongoclient/MongoClientInstrumentation.java

3.12: https://github.com/mongodb/mongo-java-driver/blob/3.12.x/driver-core/src/main/com/mongodb/connection/Connection.java

4.0: https://github.com/mongodb/mongo-java-driver/blob/4.0.x/driver-core/src/main/com/mongodb/connection/Connection.java

Steps to reproduce:

  1. Run APM agent 1.18.0 on a spring boot application version 2.3.3.RELEASE with Mongo

Errors in browser console (if relevant): None

Provide logs and/or server output (if relevant): None

Hi @marcelo.pio, welcome to our forum !

Yes, we currently only support MongoDB version 3.x (as written in our documentation).

We use this form to prioritize framework/library support, have you already filled it ? However, it does not include any part relative to storage nor a specific version (please add it to the last freeform input).

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Hi @marcelo.pio.

FYI we have opened an implementation issue as we want to add support for newer versions of the MongoDB driver to the agent. Feel free to subscribe/comment on the issue so you'll get notified when we start working on it.

Have a nice day !