10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
# File 'lib/herdst_worker/adapters/sentry.rb', line 10
def self.setup(app)
begin
environment = app.config.metadata[:DEPLOYMENT_ENV]
release = app.config.metadata[:RELEASE_VERSION]
sentry_key = app.config.metadata[:SENTRY_KEY]
::Sentry.init do |config|
config.environment = environment
config.dsn = sentry_key
config.enabled_environments = %w[preview production]
config.release = "#{environment}@#{release}"
config.traces_sample_rate = 0.1
config.profiles_sample_rate = 0.1
end
rescue Exception => ex
app.logger.error ex.message
end
end
|