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

Commit

Permalink
remove appsignal, print errors for Papertrail
Browse files Browse the repository at this point in the history
Appsignal continues to spam the log with Thread warnings, and we have no
one to maintain the integration. This change means at least errors will
be sent into papertrail, where they can be surfaced by Slack.
  • Loading branch information
indirect committed Aug 21, 2016
1 parent 7b5d926 commit 5b30df3
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 27 deletions.
1 change: 0 additions & 1 deletion Gemfile
Expand Up @@ -8,7 +8,6 @@ git_source(:github) do |repo|
"https://github.com/#{repo}.git"
end

gem 'appsignal', '0.11.6.beta.0'
gem 'librato-metrics'
gem 'metriks-librato_metrics', github: 'indirect/metriks-librato_metrics'
gem 'metriks-middleware'
Expand Down
5 changes: 0 additions & 5 deletions Gemfile.lock
Expand Up @@ -15,9 +15,6 @@ GEM
remote: https://rubygems.org/
specs:
aggregate (0.2.2)
appsignal (0.11.6.beta.0)
rack
thread_safe
artifice (0.6)
rack-test
ast (2.2.0)
Expand Down Expand Up @@ -100,15 +97,13 @@ GEM
tilt (>= 1.3, < 3)
slop (3.6.0)
thor (0.19.1)
thread_safe (0.3.5)
tilt (2.0.2)
unicode-display_width (0.3.1)

PLATFORMS
ruby

DEPENDENCIES
appsignal (= 0.11.6.beta.0)
artifice
compact_index
dalli
Expand Down
6 changes: 1 addition & 5 deletions lib/bundler_api/agent_reporting.rb
Expand Up @@ -56,11 +56,7 @@ def known_id?(id)
BundlerApi.redis.setex(id, 120, true)
false
rescue => ex
# Sometimes we get these, and there's no point throwing out a perfectly
# good metric. We still, however, want to report it in Appsignal so that
# we know what's up.
Appsignal.add_exception(ex) if defined?(Appsignal)

STDERR.puts "[Error][AgentReporting] `known_id?` raised #{e.class}: #{e.message}"
false
end
end
11 changes: 0 additions & 11 deletions lib/bundler_api/appsignal.rb

This file was deleted.

2 changes: 1 addition & 1 deletion lib/bundler_api/metriks.rb
Expand Up @@ -35,7 +35,7 @@ def source_name(worker = nil)

def error_handler
-> (e) do
STDOUT.puts("[Metriks][Librato] #{e.class} raised during metric submission: #{e.message}")
STDOUT.puts("[Error][Librato] #{e.class} raised during metric submission: #{e.message}")

if e.is_a?(::Metriks::LibratoMetricsReporter::RequestFailedError)
STDOUT.puts(" Response body: #{e.res.body}")
Expand Down
6 changes: 2 additions & 4 deletions lib/bundler_api/web.rb
Expand Up @@ -6,7 +6,6 @@
require 'bundler_api/agent_reporting'
require 'bundler_api/checksum'
require 'bundler_api/gem_info'
require 'bundler_api/appsignal'
require 'bundler_api/cache'
require 'bundler_api/metriks'
require 'bundler_api/runtime_instrumentation'
Expand All @@ -22,8 +21,6 @@ class BundlerApi::Web < Sinatra::Base
NEW_INDEX_ENABLED = ENV['NEW_INDEX_DISABLED'].nil?

unless ENV['RACK_ENV'] == 'test'
use Appsignal::Rack::Listener, name: 'bundler-api'
use Appsignal::Rack::SinatraInstrumentation
use Metriks::Middleware
use BundlerApi::AgentReporting
end
Expand Down Expand Up @@ -277,7 +274,8 @@ def in_background
begin
yield
rescue => e
Appsignal.send_exception(e)
STDOUT.puts "[Error][Web] #{e.class} raised during background task: #{e.message}")
STDERR.puts e.backtrace.join("\n ")
end
end
end
Expand Down

0 comments on commit 5b30df3

Please sign in to comment.