Skip to content

Commit

Permalink
Update config doc opening
Browse files Browse the repository at this point in the history
This updates outdated content in the ERB template that generates the config documentation.
  • Loading branch information
kaylareopelle committed Dec 20, 2023
1 parent 9f6d983 commit ea16b45
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/tasks/helpers/config.html.erb
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@ redirects:

<CONTRIBUTOR_NOTE>
This file is automatically generated from values defined in `lib/new_relic/agent/configuration/default_source.rb`.
All changes should be made directly to `default_source.rb.`
Make all changes directly to `default_source.rb.`
Submit PRs or raise issues at: https://github.com/newrelic/newrelic-ruby-agent
</CONTRIBUTOR_NOTE>

@@ -42,9 +42,9 @@ In other words, environment variables override all other configuration settings

## View and edit config file options [#Edit]

The Ruby agent's `newrelic.yml` is a standard YAML configuration file. It typically includes a `Defaults` section at the top, plus sections below for each application environment; for example, `Development`, `Testing`, and `Production`.
The Ruby agent's `newrelic.yml` is a standard YAML configuration file. It typically includes a `Defaults` section at the top, plus sections below for each application environment (for example, `Development`, `Staging`, and `Production`).

The Ruby agent determines which section of the `newrelic.yml` config file to read from by looking at certain environment variables to derive the application's environment. This can be useful, for example, when you want to use `info` for the `log_level` config setting in your production environment, and you want more verbose `log_level` config settings (such as `debug` in your development environment.
The Ruby agent determines which section of the `newrelic.yml` config file to read from by looking at certain environment variables to derive the application's environment. This can be useful when you want to use `info` for the `log_level` config setting in your production environment, and you want more verbose `log_level` config settings (such as `debug`) in your development environment.

Here is an example `newrelic.yml` config file:

@@ -60,17 +60,17 @@ development:
log_level: debug
```

For non-Rails apps, the Ruby agent looks for the following environment variables, in this order, to determine the application environment:
The Ruby agent looks for the following environment variables, in this order, to find the application environment:

1. `NEW_RELIC_ENV`
2. `RUBY_ENV`
3. `RAILS_ENV`
4. `APP_ENV`
5. `RACK_ENV`

If the Ruby agent does not detect values for any of those environment variables, it will default the application environment to `development` and read from the `development` section of the `newrelic.yml` config file.
If the Ruby agent doesn't detect values for any of those environment variables, it will default the application environment to `development` and read from the `development` section of the `newrelic.yml` config file.

When running the Ruby agent in a Rails app, the agent first looks for the `NEW_RELIC_ENV` environment variable to determine the application environment and which section of the `newrelic.yml` to use. If `NEW_RELIC_ENV` is not present, the agent uses the Rails environment (`RAILS_ENV` or `RAILS.env`, depending on the version of Rails) .
When running the Ruby agent in a Rails app, the agent first looks for the `NEW_RELIC_ENV` environment variable to determine the application environment and which section of the `newrelic.yml` to use. If `NEW_RELIC_ENV` is not present, the agent uses the Rails environment (`RAILS_ENV`).

When you edit the config file, be sure to:

0 comments on commit ea16b45

Please sign in to comment.