Skip to content
This repository has been archived by the owner on May 14, 2022. It is now read-only.

Initialize datadog in staging or production only #1090

Merged
merged 1 commit into from
Mar 13, 2017
Merged

Conversation

eliotjordan
Copy link
Member

@eliotjordan eliotjordan commented Mar 13, 2017

Datadog should only be initialized in staging or production environments. This PR removes the error message:

E, [2017-03-13T17:00:52.579684 #46229] ERROR -- : Failed to open TCP connection to localhost:8126 (Connection refused - connect(2) for "localhost" port 8126)

default_service: "Plum (#{Rails.env})"
}
Datadog::Monkey.patch_all
if ENV['RAILS_ENV'] == 'staging' || ENV['RAILS_ENV'] == 'production'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we do Rails.env.staging? || Rails.env.production? instead?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can do.

@coveralls
Copy link

coveralls commented Mar 13, 2017

Coverage Status

Coverage remained the same at 99.806% when pulling ce1a6e9 on datadog_in_dev into 51d85d0 on master.

@tpendragon tpendragon merged commit e1efa89 into master Mar 13, 2017
@tpendragon tpendragon deleted the datadog_in_dev branch March 13, 2017 23:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants