Skip to content

Latest commit

 

History

History
92 lines (73 loc) · 2.3 KB

mongo-instrumentation.mdx

File metadata and controls

92 lines (73 loc) · 2.3 KB
title tags metaDescription redirects freshnessValidatedDate
Mongo instrumentation
Agents
Ruby agent
Instrumented gems
New Relic Ruby agent support for MongoDB
/docs/agents/ruby-agent/frameworks/mongo-instrumentation
/docs/ruby/mongo
never

The Ruby agent has built-in instrumentation for MongoDB queries made via the mongo gem.

Supported gems [#supported_gems]

This summarizes the Ruby agent's support for gems by version.

  <th>
    <DNT>
      **Comments**
    </DNT>
  </th>
</tr>
  <td>
    Supported by New Relic's Ruby agent 3.7.1 or higher
  </td>
</tr>

<tr>
  <td>
    `mongo` 2.0
  </td>

  <td>
    Not supported
  </td>
</tr>

<tr>
  <td>
    `mongo` 2.1 or higher
  </td>

  <td>
    Requires New Relic's Ruby agent 3.13.1 or higher
  </td>
</tr>

<tr>
  <td>
    Other gems
  </td>

  <td>
    Support for Mongoid 2/3/4 and Moped currently is available only via third-party gems. For links to the relevant projects, see [extends_newrelic_rpm](https://github.com/newrelic/extends_newrelic_rpm).
  </td>
</tr>
**Gem version**
`mongo` 1.8 and 1.9

Third-party and extends_newrelic_rpm instrumentation [#third_party_instrumentation]

The extends_newrelic_rpm and newrelic_mongo gems both provide basic instrumentation for mongo. New Relic does not recommend running Mongo instrumentation via these gems alongside the Ruby agent's built-in Mongo support. This might double-count metrics such as overall database time.

Also, the extends_newrelic_rpm and newrelic_mongo gems both use a distinct setting that can be used to disable them if removing those gems entirely isn't possible in your environment. For those third party gems, set disable_mongodb: false in your newrelic.yml.

Disabling instrumentation [#Disabling_instrumentation]

To disable Mongo instrumentation in the agent, add the following to your newrelic.yml:

disable_mongo: true