<commit_before># New Relic Moped [![Build Status](https://travis-ci.org/stevebartholomew/newrelic_moped.svg)](https://travis-ci.org/stevebartholomew/newrelic_moped)

New Relic instrumentation for Moped (1.x, 2.0) / Mongoid (3.x, 4.0)

## Important

This gem is compatible only with __newrelic_rpm__ >= 3.11

If you can't upgrade to __newrelic_rpm__ 3.11 or higher please use "__0.x__" branch of this gem.

## Installation

Add this line to your application's Gemfile:

    gem 'newrelic_moped'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install newrelic_moped

### Sinatra, Resque, Sidekiq

When you don't use in Sinatra config.ru

    run Rack::URLMap.new '/' => Sinatra::Application

or you would like to instrument *Moped* usage in non-Rack configurations like *Resque*, *Sidekiq* or even in *irb*, you have to be sure that *newrelic_moped* is required **before** *newrelic_rpm*

    require 'newrelic_moped'<commit_msg>Readme update<commit_after># New Relic Moped [![Build Status](https://travis-ci.org/stevebartholomew/newrelic_moped.svg)](https://travis-ci.org/stevebartholomew/newrelic_moped)

New Relic instrumentation for Moped (1.x, 2.0) / Mongoid (3.x, 4.0)

## Important

This gem is compatible only with __newrelic_rpm__ >= 3.11

If you can't upgrade to __newrelic_rpm__ 3.11 or higher please use "__0.x__" branch of this gem.

Latest release of 0.x branch is v0.0.13

## Installation

Add this line to your application's Gemfile:

    gem 'newrelic_moped'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install newrelic_moped

### Sinatra, Resque, Sidekiq

When you don't use in Sinatra config.ru

    run Rack::URLMap.new '/' => Sinatra::Application

or you would like to instrument *Moped* usage in non-Rack configurations like *Resque*, *Sidekiq* or even in *irb*, you have to be sure that *newrelic_moped* is required **before** *newrelic_rpm*

    require 'newrelic_moped'
{'fraction_non_alphanumeric': 0.10231362467866324, 'fraction_numerical': 0.015938303341902313, 'mean_word_length': 4.302452316076295, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4164141', 'n_tokens_mistral': 716, 'n_tokens_neox': 679, 'n_words': 221}