Confluence add-on development - how to connect to mongoDB?

I’m trying to connect to mongoDB to create log records on user action while using the add-on. Not able to find any useful documentation.
I tried to integrate spring mongo-db module per some online example (
But getting too many osgi wiring related issues. Any help will be appreciated! Thanks!

Additional info:
Primary backend DB is another RDBMS (say MySQL). This mongoDB connection will be just for this plugin for logging some user activities.

@sameer.v any luck in achieving your desired outcome ?

No I didn’t pursue this further.