---
title: Introduction to New Relic for Ruby
source: https://docs.newrelic.com/docs/apm/agents/ruby-agent/getting-started/introduction-new-relic-ruby
---

The New Relic Ruby agent monitors your applications to help you [identify and solve performance issues](#monitor-performance). You can also extend the agent's performance monitoring to [collect and analyze business data](#business-data) to help you improve the customer experience and make data-driven business decisions.

Use the New Relic Ruby agent to solve your app's performance issues with our [My app is slow tutorial](https://docs.newrelic.com/docs/journey-app-slow/root-causes/).

## Compatibility and requirements [#compat]

The Ruby agent supports many of the most common [Ruby frameworks and platforms](https://docs.newrelic.com/docs/agents/ruby-agent/getting-started/supported-frameworks). You can also use the Ruby agent in a [Google App Engine (GAE) flexible environment](https://docs.newrelic.com/docs/agents/ruby-agent/installation/install-new-relic-ruby-agent-gae-flexible-environment). Before you install the Ruby agent, ensure your system meets the [system requirements](https://docs.newrelic.com/docs/agents/ruby-agent/getting-started/ruby-agent-requirements-supported-frameworks/).

## Monitor app performance [#monitor-performance]

**View the big picture of your app**

-   Monitor your app's [Apdex (user satisfaction)](https://docs.newrelic.com/docs/apm/new-relic-apm/apdex/apdex-measuring-user-satisfaction).
-   Get a [high-level summary of your app](https://docs.newrelic.com/docs/apm/applications-menu/monitoring/apm-overview-page).
-   Create [architectural maps](https://docs.newrelic.com/docs/data-analysis/user-interface-functions/view-your-data/service-maps-visualize-monitor-apps-entire-architecture) of your app.
-   Enable [distributed tracing](https://docs.newrelic.com/docs/apm/agents/ruby-agent/configuration/distributed-tracing-ruby-agent) to understand activity in an environment that relies on many services.
-   Install [New Relic infrastructure monitoring](https://docs.newrelic.com/docs/infrastructure) and view detailed host data for your app.

**Find errors and problems quickly**

-   Track [key transactions.](https://docs.newrelic.com/docs/apm/transactions/key-transactions/key-transactions-tracking-important-transactions-or-events)
-   Create [customized dashboards](https://docs.newrelic.com/docs/insights/use-insights-ui/advanced-ui-tasks/add-edit-copy-insights-dashboards) for important metrics.
-   [Alert](https://docs.newrelic.com/docs/alerts/alert-policies/understanding-alert-policies/alerting-new-relic) your team when errors or problems occur before they affect your users.
-   Track performance [after a deployment](https://docs.newrelic.com/docs/agents/ruby-agent/features/recording-deployments-ruby-agent).

**Drill down into performance details**

-   Examine code-level [transaction traces](https://docs.newrelic.com/docs/apm/transactions/transaction-traces/transaction-traces)
-   Examine [database query traces](https://docs.newrelic.com/docs/apm/transactions/transaction-traces/sql-statements).
-   Examine [error traces](https://docs.newrelic.com/docs/apm/applications-menu/events/viewing-apm-errors-error-traces).
-   Monitor [Ruby background processes and daemons](https://docs.newrelic.com/docs/agents/ruby-agent/background-jobs/monitoring-ruby-background-processes-daemons).

**View logs for your APM and infrastructure data**

Bring your logs and application's data together to make troubleshooting easier and faster. No need to switch to another UI page.

-   With [logs in context](https://docs.newrelic.com/docs/logs/logs-context/configure-logs-context-ruby/), you can see log messages related to your errors and traces directly in your app's UI.
-   You can also see logs in context of your [infrastructure data](https://docs.newrelic.com/docs/logs/forward-logs/forward-your-logs-using-infrastructure-agent/), such as Kubernetes clusters.

**Analyze business data**

Use the Ruby agent to organize, query, and visualize your data to answer key questions about application performance and customer experience.

-   Use default transaction attributes or [add your own](https://docs.newrelic.com/docs/using-new-relic/data/customize-data/collect-custom-attributes).
-   Query your data [using NRQL](https://docs.newrelic.com/docs/query-your-data/nrql-new-relic-query-language/get-started/introduction-nrql-new-relics-query-language).
-   Send [your own event data](https://docs.newrelic.com/docs/apm/new-relic-apm/getting-started/introduction-apm).
-   Create and share customizable, interactive [dashboards](https://docs.newrelic.com/docs/query-your-data/explore-query-data/dashboards/introduction-new-relic-one-dashboards).

## Install the agent [#install]

After creating a [New Relic account](https://newrelic.com/signup), use our launcher or see the installation instructions.

[Install docs for gem (recommended)](https://docs.newrelic.com/docs/agents/ruby-agent/installation/install-new-relic-ruby-agent)

[Install docs for rails plugin](https://docs.newrelic.com/docs/agents/ruby-agent/installation/ruby-agent-installation-rails-plugin)

[Add Ruby data](https://one.newrelic.com/marketplace/install-data-source?state=697923ba-6f87-39b9-4f6b-1bac644808c9)

## Extend agent instrumentation [#extend]

After installing the agent, go further and extend the agent's instrumentation:

-   [Page load timing](https://docs.newrelic.com/docs/agents/ruby-agent/features/page-load-timing-ruby): [Automatically inject the browser monitoring agent](https://docs.newrelic.com/docs/browser/new-relic-browser/getting-started/new-relic-browser) to get visibility into end-user activity.
-   [Custom instrumentation](https://docs.newrelic.com/docs/agents/ruby-agent/features/ruby-custom-instrumentation): Instrument transactions not captured as part of our framework instrumentation.
-   [Agent API](https://docs.newrelic.com/docs/agents/ruby-agent/customization/ruby-agent-api-guide): Use the agent API to fully customize the agent's behavior. For example, you can collect custom metrics, flag an error, or ignore a particular transaction entirely.
-   [Custom metrics](https://docs.newrelic.com/docs/agents/ruby-agent/features/ruby-custom-metrics): Record additional metrics as part of a transaction to gain more insights into your app's performance and business data.
-   [Agent attributes](https://docs.newrelic.com/docs/agents/ruby-agent/attributes/ruby-agent-attributes): Customize the [attributes](https://docs.newrelic.com/docs/agents/manage-apm-agents/agent-metrics/agent-attributes) attached to transactions. Customizing attributes allows you to avoid sending sensitive attributes, or to collect additional attributes for deeper visibility into your transactions.

## Troubleshooting [#tshoot]

If you're having problems, see the Ruby agent troubleshooting docs. Common issues include:

-   [No data appears (Ruby)](https://docs.newrelic.com/docs/agents/ruby-agent/troubleshooting/no-data-appears-ruby)
-   [Gems incompatible with the Ruby agent](https://docs.newrelic.com/docs/agents/ruby-agent/troubleshooting/incompatible-gems)
-   [Sending handled errors to New Relic](https://docs.newrelic.com/docs/agents/ruby-agent/troubleshooting/sending-new-relic-handled-errors)
-   [Controlling when the Ruby agent starts](https://docs.newrelic.com/docs/agents/ruby-agent/troubleshooting/controlling-when-ruby-agent-starts)

## Check the source code [#source-code]

The Ruby agent is open source software. That means you can [browse its source code](https://github.com/newrelic/newrelic-ruby-agent) and send improvements, or create your own fork and build it. For more information, see the [README](https://github.com/newrelic/newrelic-ruby-agent/blob/main/README.md).
