| Class | NewRelic::EnvironmentReport |
| In: |
lib/new_relic/environment_report.rb
|
| Parent: | Object |
The EnvironmentReport is responsible for analyzing the application‘s environment and generating the data for the Environment Report in New Relic‘s interface.
It contains useful system information like Ruby version, OS, loaded gems, etc.
Additional logic can be registered by using the EnvironmentReport.report_on hook.
| data | [R] | end reporting logic |
This is the main interface for registering logic that should be included in the Environment Report. For example:
EnvironmentReport.report_on "Day of week" do
Time.now.strftime("%A")
end
The passed blocks will be run in EnvironmentReport instances on initialize.
Errors raised in passed blocks will be handled and logged at debug, so it is safe to report on things that may not work in certain environments.
The blocks should only return strings or arrays full of strings. Falsey values will be ignored.