Configure the Ruby agent's error collector to customize how errors are captured, which errors to ignore or treat as expected, and how error events are sampled.
Error Collector
The agent collects and reports all uncaught exceptions by default. These configuration options allow you to customize the error collection.
If true, the agent captures traced errors and error count metrics.
Type
Array
Default
[]
Environ variable
None
A list of error classes that the agent should treat as expected.
Caution
This option can't be set via environment variable.
Type
Hash
Default
{}
Environ variable
None
A map of error classes to a list of messages. When an error of one of the classes specified here occurs, if its error message contains one of the strings corresponding to it here, that error will be treated as expected.
Caution
This option can't be set via environment variable.
Type
String
Default
""
Environ variable
NEW_RELIC_ERROR_COLLECTOR_EXPECTED_STATUS_CODES
A comma-separated list of HTTP status codes and/or status code ranges (for example, 404, 429, 500-599). Errors associated with a matching status code, if the error has one, will be treated as expected.
A list of error classes that the agent should ignore.
Caution
This option can't be set via environment variable.
Type
Hash
Default
{ThreadError: ["queue empty"]}
Environ variable
None
A map of error classes to a list of messages. When an error of one of the classes specified here occurs, if its error message contains one of the strings corresponding to it here, that error will be ignored.
Caution
This option can't be set via environment variable.
Type
String
Default
""
Environ variable
NEW_RELIC_ERROR_COLLECTOR_IGNORE_STATUS_CODES
A comma-separated list of HTTP status codes and/or status code ranges (for example, 404, 429, 500-599). Errors associated with a matching status code, if the error has one, will be ignored.
Type
Integer
Default
50
Environ variable
NEW_RELIC_ERROR_COLLECTOR_MAX_BACKTRACE_FRAMES
Defines the maximum number of frames in an error backtrace. Backtraces over this amount are truncated in the middle by default, preserving the beginning and the end of the stack trace. See error_collector.backtrace_truncate_location to customize the truncation location.
Specifies where in the backtrace to truncate when the number of frames exceeds error_collector.max_backtrace_frames. Options are top (remove frames from the beginning), middle (remove frames from the middle, preserving the beginning and end), or end (remove frames from the end).
Setting one of the following environment variables will help you identify which versions of your software produced the errors.
NEW_RELIC_METADATA_SERVICE_VERSION creates tags.service.version on event data containing the version of your code that is deployed, in many cases a semantic version such as 1.2.3, but not always.
NEW_RELIC_METADATA_RELEASE_TAG creates tags.releaseTag on event data containing the release tag (such as v0.1.209 or release-209).
NEW_RELIC_METADATA_COMMIT creates tags.commit on event data containing the commit SHA. The entire SHA can be used or just the first seven characters (e.g., 734713b).
Errors inbox will automatically track which versions of your software are producing errors.