Skip to content

Commit

Permalink
chore(ruby agent): Update config docs
Browse files Browse the repository at this point in the history
  • Loading branch information
newrelic-ruby-agent-bot committed Oct 31, 2024
1 parent bd4c3f1 commit f1e745d
Showing 1 changed file with 26 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -495,13 +495,13 @@ These settings are available for agent configuration. Some settings depend on yo
</tbody>
</table>

An array of `CLASS#METHOD` (for instance methods) and/or `CLASS.METHOD` (for class methods) strings representing Ruby methods for which the agent will try to add a tracer. This doesn't require any code modifications of the classes that define the methods.
An array of `CLASS#METHOD` (for instance methods) and/or `CLASS.METHOD` (for class methods) strings representing Ruby methods that the agent can automatically add custom instrumentation to. This doesn't require any modifications of the source code that defines the methods.

Use fully qualified class names (using the `::` delimiter) that include any module or class namespacing.

Here is some Ruby source code that defines a `render_png` instance method for an `Image` class and a `notify` class method for a `User` class, both within a `MyCompany` module namespace:

```ruby
```
module MyCompany
class Image
def render_png
Expand All @@ -519,21 +519,21 @@ end

Given that source code, the `newrelic.yml` config file might request instrumentation for both of these methods like so:

```yml
```
automatic_custom_instrumentation_method_list:
- MyCompany::Image#render_png
- MyCompany::User.notify
```

That configuration example uses YAML array syntax to specify both methods. Alternatively, you can use a comma-delimited string:

```yml
```
automatic_custom_instrumentation_method_list: 'MyCompany::Image#render_png, MyCompany::User.notify'
```

Whitespace around the comma(s) in the list is optional. When configuring the agent with a list of methods via the `NEW_RELIC_AUTOMATIC_CUSTOM_INSTRUMENTATION_METHOD_LIST` environment variable, use this comma-delimited string format:

```sh
```
export NEW_RELIC_AUTOMATIC_CUSTOM_INSTRUMENTATION_METHOD_LIST='MyCompany::Image#render_png, MyCompany::User.notify'
```

Expand Down Expand Up @@ -1380,6 +1380,26 @@ This section includes Ruby agent configurations for setting up AI monitoring.

</CollapserGroup>

## Cloud [#cloud]



<CollapserGroup>

<Collapser id="cloud-aws-account_id" title="cloud.aws.account_id">
<table>
<tbody>
<tr><th>Type</th><td>String</td></tr>
<tr><th>Default</th><td>`nil`</td></tr>
<tr><th>Environ variable</th><td>`NEW_RELIC_CLOUD_AWS_ACCOUNT_ID`</td></tr>
</tbody>
</table>

The AWS account ID for the AWS account associated with this app
</Collapser>

</CollapserGroup>

## Code Level Metrics [#code-level-metrics]


Expand Down Expand Up @@ -3103,4 +3123,4 @@ the `stripe.user_data.include` option is being used.
If `true`, the agent automatically detects that it is running in a Pivotal Cloud Foundry environment.
</Collapser>

</CollapserGroup>
</CollapserGroup>

0 comments on commit f1e745d

Please sign in to comment.