Skip to content
This repository was archived by the owner on Nov 21, 2018. It is now read-only.

Commit 61ddf22

Browse files
committed
Make Sentry and DataDog optional
1 parent 89025a3 commit 61ddf22

File tree

4 files changed

+15
-12
lines changed

4 files changed

+15
-12
lines changed

config/initializers/0010_datadog.rb

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
class Dog
2+
def self.client
3+
# Un-comment to use DataDog
4+
# @client ||= Dogapi::Client.new('...')
5+
end
6+
end

config/initializers/boxes.rb

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
Box.define do
44
box Box.local_id do
55
hostname Socket.gethostname
6-
workers [RepoWorker, CouchWorker, ServerReportWorker, ModelSearchWorker,
7-
ChannelWorker, EngagementWorker, ChartWorker, TaskWorker, MatchMaker]
6+
workers [RepoWorker, CouchWorker, (ServerReportWorker if Dog.client), ModelSearchWorker,
7+
ChannelWorker, EngagementWorker, ChartWorker, TaskWorker, MatchMaker].compact
88
services [:octc]
99
end
1010
end
@@ -28,7 +28,7 @@
2828
end
2929

3030
box 'box02' do
31-
workers [RepoWorker, TaskWorker, ServerReportWorker, ModelSearchWorker, MatchMaker]
31+
workers [RepoWorker, TaskWorker, (ServerReportWorker if Dog.client), ModelSearchWorker, MatchMaker].compact
3232
services [:octc]
3333
end
3434

config/initializers/datadog.rb

-5
This file was deleted.

config/initializers/sentry.rb

+6-4
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,13 @@
77

88
config.async = Raven.method(:send_event_async)
99

10+
# Un-comment these to actually use Raven
1011
case Rails.env
11-
when 'development'
12-
config.dsn = '...'
13-
when 'production', 'staging'
14-
config.dsn = '...'
12+
# when 'development'
13+
# config.dsn = '...'
14+
# when 'production', 'staging'
15+
# config.dsn = '...'
16+
when ''
1517
else
1618
config.environments = []
1719
end

0 commit comments

Comments
 (0)