The Ruby agent is not properly starting or is not reporting data to New Relic.
To solve this problem:
newrelic_rpm Ruby gem is required in your application environment, it will attempt to determine whether to start monitoring automatically and begin transmitting metrics to New Relic, or to remain disabled.
Production and staging: The agent typically is configured to monitor automatically in these environments.
Test and development: The agent typically remains disabled in these environments.
To control this logic, set the
monitor_modeconfiguration key to
falsein each environment section of
To override the agent's auto-start logic, the easiest mechanism is to set a
NEW_RELIC_AGENT_ENABLED=true environment variable; for example:
NEW_RELIC_AGENT_ENABLED=true rake assets:precompile
If you are running Ruby agent version 3.6.1 or higher, there are a few reasons the agent will refuse to start:
The agent detects it is in an interactive session; for example, a
The agent detects it is in one of Rails' built-in rake tasks; for example,
You can use configuration variables in your Ruby agent
newrelic.ymlfile to customize auto-start behavior for constants, script names, and rake tasks.
- Ruby constants that should prevent the agent from starting. Accepts a comma separated list.
- Defaults to
- Set to
""to tell the agent to start when
Rails::Consoleis in the environment.
- Rake tasks you do not want the agent to monitor; for example,
assets:precompile. Accepts a comma-separated list.
- We do not disable the Ruby agent in all rake tasks, because tasks like
resque:workgenerally are monitored.
- A list of script names, such as
irb, that will prevent the agent from starting automatically. Accepts a comma-separated list.
- Set this to
"rake"to prevent the agent from starting in rake tasks, or
"rake,my_ruby_script.rb"to prevent it from starting in rake and a custom script.