Giter Site home page Giter Site logo

rpm's Introduction

New Relic Ruby Agent

New Relic is a performance management system, developed by New Relic, Inc (http://www.newrelic.com). It provides you with deep information about the performance of your Rails or Ruby application as it runs in production and transmits them to newrelic.com where you can monitor them in real time. The New Relic Ruby Agent is dual-purposed as a either a Gem or a Rails plugin, hosted on github.

Supported Environments

An up-to-date list of Ruby versions and frameworks for the latest agent can be found on our docs site.

You can also monitor non-web applications. Refer to the "Other Environments" section under "Getting Started".

Contributing Code

We welcome code contributions (in the form of pull requests) from our user community. Before submitting a pull request please review these guidelines.

Following these helps us efficiently review and incorporate your contribution and avoid breaking your code with future changes to the agent.

Getting Started

Add the Ruby Agent to your project's Gemfile.

gem 'newrelic_rpm'

To monitor your applications in production, create an account at http://newrelic.com/ . There you can sign up for a free Lite account or one of our paid subscriptions.

Once you receive the welcome email with a license key and newrelic.yml file, you can copy the newrelic.yml file into your app config directory OR can generate the file manually with command:

newrelic install --license_key="YOUR_KEY" "My application"

The initial configuration is done in the newrelic.yml file. This file is by default read from the config directory of the application root and is subsequently searched for in the application root directory, and then in a ~/.newrelic directory. Once you're up and running you can enable Server Side Config and manage your newrelic configuration from the web UI.

Rails Installation

You can install the agent as a Gem:

For Bundler:

Add the following line to your Gemfile:

gem 'newrelic_rpm'

For Rails 2.x without Bundler:

edit environment.rb and add to the initalizer block:

config.gem "newrelic_rpm"

Sinatra Installation

To use the Ruby Agent with a Sinatra app, add:

require 'newrelic_rpm'

in your Sinatra app, below the Sinatra require directive.

Then make sure you set RACK_ENV to the environment corresponding to the configuration definitions in the newrelic.yml file; e.g., development, staging, production, etc.

Other Environments

You can use the Ruby Agent to monitor any Ruby application. Add:

require 'newrelic_rpm'

to your startup sequence and then manually start the agent using:

NewRelic::Agent.manual_start

For information about instrumenting pure Rack applications, see our Rack middlewares documentation.

Refer to the New Relic's Docs for details on how to monitor other web frameworks, background jobs, and daemons.

The Ruby Agent provides an API that allows custom instrumentation of additional frameworks. You can find a list of community created intrumentation plugins (e.g. newrelic-redis) in the extends_newrelic_rpm project.

Production Mode

When your application runs in the production environment, the New Relic agent runs in production mode. It connects to the New Relic service and sends deep performance data to the UI for your analysis. To view this data, log in to http://rpm.newrelic.com.

NOTE: You must have a valid account and license key to view this data online. Refer to instructions in Getting Started.

Recording Deploys

The Ruby Agent supports recording deployments in New Relic via a command line tool or Capistrano recipes. For more information on these features see our deployment documentation for more information.

Support

You can find more detailed documentation on our website, and specifically in the Ruby category.

If you can't find what you're looking for there, reach out to us on our support site or our community forum and we'll be happy to help you.

Find a bug? Contact us via support.newrelic.com, or email [email protected].

Thank you, and may your application scale to infinity plus one.

Lew Cirne, Founder and CEO

New Relic, Inc.

rpm's People

Contributors

jasonrclark avatar benweint avatar mwear avatar gnarg avatar thejonanshow avatar jaggederest avatar jimgochee avatar kwugirl avatar kenichi avatar cirne avatar justinfoote avatar rsaul avatar tkrajcar avatar sdaubin avatar ged avatar darinrelic avatar aughr avatar jpr5 avatar samg avatar rkbodenner avatar jessedearing avatar durran avatar kovyrin avatar mislav avatar kbrock avatar jeremy avatar callumj avatar austin-schaefer avatar codegoalie avatar blaet avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.