Skip to content

Commit

Permalink
RUBY-1773 Consider APP_ENV when determining environment
Browse files Browse the repository at this point in the history
  • Loading branch information
mwear committed May 16, 2017
1 parent a41ec84 commit dcf3bbe
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@

The Ruby agent has been validated against the latest release of Ruby on Rails!

* APP_ENV considered when determining environment

The agent will now consider the APP_ENV environment when starting up.

## v4.1.0 ##

* Developer Mode removed
Expand Down
4 changes: 2 additions & 2 deletions lib/new_relic/control/frameworks/ruby.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ module Frameworks
# A control used when no framework is detected - the default.
class Ruby < NewRelic::Control
def env
@env ||= ENV['NEW_RELIC_ENV'] || ENV['RUBY_ENV'] ||
ENV['RAILS_ENV'] || ENV['RACK_ENV'] || 'development'
@env ||= ENV['NEW_RELIC_ENV'] || ENV['RUBY_ENV'] || ENV['RAILS_ENV'] ||
ENV['APP_ENV'] || ENV['RACK_ENV'] || 'development'
end

def root
Expand Down

0 comments on commit dcf3bbe

Please sign in to comment.