From d7217a23534070ba12048525e2d592c689a6b8bc Mon Sep 17 00:00:00 2001 From: Hannah Ramadan Date: Wed, 26 Nov 2025 11:45:18 -0800 Subject: [PATCH] 10.x changes --- .../record-deployments-ruby-agent.mdx | 281 ------------------ ...gent-requirements-supported-frameworks.mdx | 34 +-- 2 files changed, 4 insertions(+), 311 deletions(-) delete mode 100644 src/content/docs/apm/agents/ruby-agent/features/record-deployments-ruby-agent.mdx diff --git a/src/content/docs/apm/agents/ruby-agent/features/record-deployments-ruby-agent.mdx b/src/content/docs/apm/agents/ruby-agent/features/record-deployments-ruby-agent.mdx deleted file mode 100644 index 5aaec0f1808..00000000000 --- a/src/content/docs/apm/agents/ruby-agent/features/record-deployments-ruby-agent.mdx +++ /dev/null @@ -1,281 +0,0 @@ ---- -title: Record deployments with the Ruby agent -tags: - - Agents - - Ruby agent - - Features -metaDescription: 'Record information about Ruby application deployments, such as production or staging environments, using Capistrano 2.x or the command line.' -redirects: - - /docs/agents/ruby-agent/features/record-deployments-ruby-agent - - /docs/ruby/caistrano-records-my-staging-deployments-in-my-production-app - - /docs/ruby/recording-deployments-with-the-ruby-agent - - /docs/agents/ruby-agent/features/recording-deployments-ruby-agent - - /docs/agents/ruby-agent/features -freshnessValidatedDate: never ---- - - - Support for recording deployments using the `newrelic deployments` command is deprecated and will be removed in agent version 10.0.0. Users should migrate to recording deployments directly via New Relic's APIs. - - For more information, please see [Change Tracking documentation](/docs/change-tracking/change-tracking-introduction/). - - -The [New Relic Ruby agent](/docs/agents/ruby-agent/getting-started/new-relic-ruby) allows you to send information about application deployments by using the [REST API](/docs/apm/new-relic-apm/maintenance/recording-deployments) or a Capistrano recipe (versions 2.x and 3.x) distributed with the Ruby agent. You can then [view deployments in the New Relic UI](/docs/apm/applications-menu/events/deployments-page). By default, all deployment information is recorded in your production environment. You can also customize the `rails_env` variable for other environments, such as staging. - -## Assign an application name [#Installation] - -To assign an application name: - -1. Download the [latest version](/docs/release-notes/agent-release-notes/ruby-release-notes) of the Ruby agent. -2. Set the `app_name` in your `newrelic.yml` file to a [meaningful name](/docs/apm/new-relic-apm/installation-and-configuration/naming-your-application). - -This will assign instances in the given environment the label given by `app_name` when browsing your data in the New Relic user interface. The deployment upload script will use that label to associate an app with the deployment. - -## Add your user key [#api-key] - -Optionally, you can record deployments via the New Relic REST API v2. To do this, provide your [user key](/docs/apis/intro-apis/new-relic-api-keys/#overview-keys) to the agent configuration using `api_key`. When this configuration is present, the `newrelic deployments` command automatically uses the REST API v2 deployment endpoint. - -## Record with the command line [#Manual] - -If you installed the Ruby agent as a gem, you can record deployments directly by using the `newrelic` executable: - -```bash -newrelic deployments -``` - -Depending on your environment, you may need to run: - -```bash -bundle exec newrelic deployment -``` - -You can use several optional values with `newrelic`. The `description` is short text. - -```bash -deployments [OPTIONS] [description] -OPTIONS: - -a, --appname=NAME Set the application name. - Default is app_name setting in newrelic.yml. Available only when using API v1. - -i, --appid=ID Set the application ID - If not provided, will connect to the New Relic collector to get it - -e, --environment=name Override the (RAILS|RUBY|RACK)_ENV setting - -u, --user=USER Specify the user deploying, for information only - -r, --revision=REV Specify the revision being deployed. Required when using New Relic REST API v2 - -l, --license-key=KEY Specify the license key of the account for the app being deployed - -c, --changes Read in a change log from the standard input - -h Show this help -``` - -When using the `-c` option, you can pipe the change log into the script. If not piping when using the `-c` option, select `control-D` to signify the end of file (EOF). - -## Record with Capistrano 3.x [#capistrano3] - -The New Relic Ruby agent contains a Capistrano recipe that can record app deployments. After [assigning your app name](#Installation), edit your Capistrano files to communicate with the agent: - -1. At the top of your Capfile, add the following line: - - ```rb - require 'new_relic/recipes' - ``` -2. In your `deploy.rb` file, include: - - ```rb - after "deploy:updated", "newrelic:notice_deployment" - ``` - -## Record with Capistrano 2.x [#capistrano2] - -You can record Capistrano 2.x deployments with the New Relic agent: - -1. Tell Capistrano to load New Relic's recipes: - - - - Add this at the top of your `deploy.rb` file: - - ```rb - require 'new_relic/recipes' - ``` - - - - In your Capfile, add the following line above `load deploy.rb` (if it is not already there): - - ```rb - Dir['vendor/plugins/*/recipes/*.rb'].each { |plugin| load(plugin) } - ``` - - -2. Add the following hooks to your `deploy.rb` file: - - ```rb - # Notify New Relic of deployments. - # This goes out even if the deploy fails, sadly. - after "deploy", "newrelic:notice_deployment" - after "deploy:migrations", "newrelic:notice_deployment" - after "deploy:cold", "newrelic:notice_deployment" - ``` - -The next time you run `cap deploy`, the agent notifies New Relic of the deployment, and all time series charts will show the deployment event. - -## Customize your Capistrano configuration [#customizing] - -If Capistrano is running the deployment notification recipe on a remote build machine,the build machine **must** have your . You can either copy a valid `newrelic.yml` file to the build machine (possibly using a Capistrano [Before Hook](https://capistranorb.com/documentation/getting-started/before-after/)) or call `set :newrelic_license_key, 'YOUR_LICENSE_KEY'` in your Capistrano configuration. - -You can customize some deployment information by using Capistrano variables. If defined, these will override the defaults. These apply to both Capistrano 2 and 3. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- Capistrano 2 and 3 variables - - Description -
- `newrelic_appname` - - The app where the deployment will appear. By default this comes from the definition in the `newrelic.yml` file for the given `rails_env`. - - If you set this value from the command line, you can only specify one application name. If you set this value in `newrelic.yml`, only the first application name will be used. -
- `newrelic_changelog` - - The change log, which is determined by running the svn/git `log` command from the local working directory where the Capistrano command was issued. -
- `newrelic_desc` - - Descriptive text that appears with the deployment. Default is empty. -
- `newrelic_license_key` - - The New Relic to use. By default this comes from the definition in the `newrelic.yml` file for the given `rails_env`. This is **not** the same as your [API key](/docs/apis/getting-started/intro-apis/access-rest-api-keys). -
- `newrelic_revision` - - The revision recorded for the deployment. Recommendation: If you are using Subversion, consider including the tag or branch name in addition to the revision. -
- `newrelic_user` - - The user to associate with the deployment. -
- -## Override Capistrano settings [#override] - -In any version of Capistrano, you can override settings in your `deploy.rb`: - -```rb -set :newrelic_user, "username" -``` - -To override settings with Capistrano 2.x: From the command line: - -```bash -cap production deploy -Snewrelic_desc="Deploying beta Krakatau release" -``` - -This example will prompt for content that will appear in the deployment's change log: - -```rb -set(:newrelic_changelog) do - Capistrano::CLI.ui.ask "Enter a summary of changes: " -end -``` - -## Deploy to staging [#staging] - -By default, the `newrelic_rpm` gem comes with Capistrano tasks to record all deployments in your production environment. If you have a separate staging application, you can change the `rails_env` variable setting so that staging deployments are recorded in the staging app instead of the production app. - -To identify deployments to your staging environment, use Capistrano or the command line. - - - - - - - - - - - - - - - - - - - - - - - -
- Deploy to staging - - Comments -
- Capistrano multistage - - If you are using Capistrano multistage, add this line to `config/deploy/staging.rb`: - - ```rb - set :rails_env, "staging" - ``` -
- Capistrano 2.x - - If you are using Capistrano 2.x, add this information from the command line: - - ```bash - cap -s rails_env=staging deployment_task_name - ``` -
diff --git a/src/content/docs/apm/agents/ruby-agent/getting-started/ruby-agent-requirements-supported-frameworks.mdx b/src/content/docs/apm/agents/ruby-agent/getting-started/ruby-agent-requirements-supported-frameworks.mdx index 967cdf81c49..06a188c46f3 100644 --- a/src/content/docs/apm/agents/ruby-agent/getting-started/ruby-agent-requirements-supported-frameworks.mdx +++ b/src/content/docs/apm/agents/ruby-agent/getting-started/ruby-agent-requirements-supported-frameworks.mdx @@ -52,10 +52,10 @@ The New Relic Ruby agent does not support experimental or non-official Ruby vers **CRuby (MRI)** - 3.4.x, 3.3.x, 3.2.x, 3.1.x, 3.0.x, 2.7.x, 2.6.x, 2.5.x, 2.4.x + 4.0.x, 3.4.x, 3.3.x, 3.2.x, 3.1.x, 3.0.x, 2.7.x, 2.6.x - Ruby 2.3.x, 2.2.x: Last fully supported by agent v8.16.0.
Ruby 2.1.x, 2.0.x: Last fully supported by agent v6.15.0.
Ruby 1.9.3: Last agent v3.18.1.
Ruby 1.8.7: Last agent v3.18.1. + Ruby 2.5.x, 2.4.x: Last fully supported by agent v9.23.0.
Ruby 2.3.x, 2.2.x: Last fully supported by agent v8.16.0.
Ruby 2.1.x, 2.0.x: Last fully supported by agent v6.15.0.
Ruby 1.9.3: Last agent v3.18.1.
Ruby 1.8.7: Last agent v3.18.1. @@ -98,10 +98,10 @@ The Ruby agent supports the following web servers. Instrumentation typically hoo **Puma** - 6.x, 5.x, 4.x, 3.x + 6.x, 5.x, 4.x - Versions {'<'} 3.x: Support may vary. + Versions {'<'} 4.x: Support may vary. @@ -337,19 +337,6 @@ The agent instruments a wide variety of database drivers and Object-Relational M - - - **Memcached (memcached gem)** - - - `memcached` - - - 1.8.x - - - - **Elasticsearch** @@ -927,19 +914,6 @@ The agent can forward logs from the following libraries for [APM logs in context ActiveMerchant 1.25.0 - 1.64.x: Last fully supported by agent v8.16.0. - - - **Capistrano** - - - `capistrano` - - - 2.15.5 and above - - - - **Concurrent Ruby**