MongoDB instrumentation

AppSignal for RubyThis feature requires version 1.0 or higher.

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

AppSignal's MongoDB instrumentation supports the Mongo Ruby Driver gem and the Mongoid gem out-of-the-box; no manual setup is required. When AppSignal detects MongoDB metrics, it will create an Automated Dashboard, allowing you to monitor core metrics visually.

Performance monitoring

Once AppSignal begins reporting MongoDB metrics, AppSignal will give you performance insights via:

Event timeline

The event timeline gives you deep insights into MongoDB query performance, allowing you to see exactly what queries are run, when, and what impact they're having on your application's responsiveness.

Example MongoDB event timeline

Sample breakdown

Sample breakdowns allow you to review MongoDB performance at a glance, allowing you to quickly spot performance problems without having to dive deep into the details.

Example MongoDB performance sample

Slow queries

AppSignal has a whole suite of tools aimed at helping you improve your application's performance. Slow queries is a simple and informative overview of your application's slow queries and the impact they're having on your application's performance, allowing you to quickly and confidently decide on the steps needed to optimize them.

Example of AppSignal slow queries feature

Automated dashboard

When AppSignal receives MongoDB metrics, it will create a MongoDB automated dashboard, available from the dashboard section of the AppSignal app.

The MongoDB automated dashboard will have the following graphs:

GraphMetricsTags
Throughputmongodb_query_durationdatabase
Query durationmongodb_query_durationdatabase

Tags give you a contextual breakdown of Active job performance information currently AppSignal reports the following tags for Active Job jobs:

NameDescription
databaseName of database metric data is recorded from.

Each tag will be represented with a colored line on the graph:

Example MongoDB dashboard

Throughput graph

The Throughput graph shows the amount of queries executed on each MongoDB database.

You can use this graph to understand how many queries your app's databases are handling, spot inefficient queries, and potential n+1 and scaling problems.

Query duration graph

The Query duration graph shows the 95th percentile and average duration of the queries executed on each MongoDB database.

You can use this graph to understand the performance of database queries, pinpoint performance issues, and fine-tune slow queries.