MongoDB instrumentation

Usage

The AppSignal gem version 1.0 and up supports the Mongo Ruby Driver gem and the Mongoid gem out-of-the-box.

The Mongoid gem relies on the Mongo Ruby Driver. AppSignal activates Mongo Ruby Driver instrumentation automatically if it is detected in the project. No manual setup is required.

Metrics

The Mongo Ruby Driver integration will report the following metrics for every query. Once we detect these metrics we'll add a magic dashboard to your apps.

  • mongodb_query_duration - measurement
    • We monitor all queries and calculate mean/90th/95th percentiles per database
    • Tag database: The database this query was executed

Older Mongoid versions and MongoMapper

Older versions of the Mongo driver used in Mongoid 2 and MongoMapper, and Moped used in Mongoid 3, are not officially supported by older AppSignal integration gems but might still work.

Want to help us improve this documentation page?

Create a pull request

Need more help?

Contact us and speak directly with the engineers working on AppSignal. They will help you get set up, tweak your code and make sure you get the most out of using AppSignal.

Contact us

Start a trial - 30 days free

AppSignal is a great way to monitor your Ruby, Elixir & Node.js applications. Works great with Rails, Phoenix, Express and other frameworks, with support for background jobs too. Let's improve your apps together.

Start a trial