| Class | NewRelic::LocalEnvironment |
| In: |
lib/new_relic/local_environment.rb
|
| Parent: | Object |
This class is responsible for determining the ‘dispatcher’ in use by the current process. The dispatcher might be a recognized web server such as unicorn or passenger, a background job processor such as resque or sidekiq, or nil for unknown.
Dispatcher detection is best-effort, and serves two purposes:
Overriding the dispatcher is possible via the NEW_RELIC_DISPATCHER environment variable, but this should not generally be necessary unless you‘re on a dispatcher that falls into category 1 above, and our detection logic isn‘t working correctly.
If the environment can‘t be determined, it will be set to nil.
NewRelic::LocalEnvironment should be accessed through NewRelic::Control#env (via the NewRelic::Control singleton).