Skip to content

Commit

Permalink
Merge pull request #93 from psu-libraries/91-bugsnag
Browse files Browse the repository at this point in the history
Use bugsnag for error reporting
  • Loading branch information
ajkiessl authored Jul 19, 2024
2 parents b99a750 + ba4d751 commit a5507fd
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 29 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" }

gem 'activejob', '~> 6.0'
gem 'aws-sdk-s3', '~> 1.60'
gem 'bugsnag'
gem 'clamby', '~> 1.6'
gem 'ddtrace', '~> 0.36'
gem 'faraday'
gem 'http'
gem 'ruby_tika_app', git: 'https://github.com/psu-libraries/ruby_tika_app.git', branch: 'tika-2.4.1'
Expand Down
9 changes: 3 additions & 6 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ GEM
parser (>= 2.4)
smart_properties
bigdecimal (3.1.8)
bugsnag (6.27.1)
concurrent-ruby (~> 1.0)
builder (3.3.0)
clamby (1.6.11)
coderay (1.1.3)
Expand All @@ -63,10 +65,6 @@ GEM
bigdecimal
rexml
crass (1.0.6)
ddtrace (0.54.2)
debase-ruby_core_source (<= 0.10.14)
msgpack
debase-ruby_core_source (0.10.14)
diff-lcs (1.5.1)
docile (1.4.0)
domain_name (0.6.20240107)
Expand Down Expand Up @@ -135,7 +133,6 @@ GEM
method_source (1.1.0)
mini_portile2 (2.8.7)
minitest (5.24.1)
msgpack (1.7.2)
nenv (0.3.0)
net-http (0.4.1)
uri
Expand Down Expand Up @@ -269,8 +266,8 @@ PLATFORMS
DEPENDENCIES
activejob (~> 6.0)
aws-sdk-s3 (~> 1.60)
bugsnag
clamby (~> 1.6)
ddtrace (~> 0.36)
faraday
guard (~> 2.16)
guard-rspec (~> 4.7)
Expand Down
10 changes: 0 additions & 10 deletions config/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,4 @@ def redis_database
def redis_url
"redis://#{redis_host}:#{redis_port}/#{redis_database}"
end

if ENV['DD_AGENT_HOST']
require 'ddtrace'
Datadog.configure do |c|
c.use :sidekiq, { analytics_enabled: true,
service_name: 'scholarsphere-metadata-listener' }
c.use :redis
c.tracer env: ENV.fetch('DD_ENV', nil)
end
end
end
18 changes: 6 additions & 12 deletions sidekiq.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
$LOAD_PATH.prepend(Pathname.pwd.join('lib').to_s)
require 'sidekiq'
require 'metadata_listener'
require 'bugsnag'

Bugsnag.configure do |config|
config.app_version = ENV.fetch('APP_VERSION', nil)
config.release_stage = ENV.fetch('BUGSNAG_RELEASE_STAGE', 'development')
end

Sidekiq.configure_client do |config|
config.redis = MetadataListener::Redis.config
Expand All @@ -11,15 +17,3 @@
Sidekiq.configure_server do |config|
config.redis = MetadataListener::Redis.config
end

if ENV['DD_AGENT_HOST']
require 'ddtrace'
Datadog.configure do |config|
config.use :sidekiq, {
analytics_enabled: true,
service_name: 'scholarsphere-metadata-listener'
}
config.use :redis
config.tracer env: ENV.fetch('DD_ENV', nil)
end
end

0 comments on commit a5507fd

Please sign in to comment.