Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

add transaction tracers for Pusher

  • Loading branch information...
commit effcbfbfd0967d2bb4c186302400627e4fe6dcf7 1 parent ef5e730
@qrush qrush authored
Showing with 17 additions and 11 deletions.
  1. +17 −11 app/models/pusher.rb
View
28 app/models/pusher.rb
@@ -1,5 +1,6 @@
class Pusher
include Vault
+ include NewRelic::Agent::Instrumentation::ControllerInstrumentation
attr_reader :user, :spec, :message, :code, :rubygem, :body, :version, :version_id
@@ -121,16 +122,21 @@ def enqueue_web_hook_jobs
end
end
- def self.indexer
- @indexer ||=
- begin
- indexer = Gem::Indexer.new(server_path, :build_legacy => false)
- def indexer.say(message) end
- indexer
- end
- end
+ def self.indexer
+ @indexer ||=
+ begin
+ indexer = Gem::Indexer.new(server_path, :build_legacy => false)
+ def indexer.say(message) end
+ indexer
+ end
+ end
+
+ def log(message)
+ Rails.logger.info "[GEMCUTTER:#{Time.now}] #{message}"
+ end
- def log(message)
- Rails.logger.info "[GEMCUTTER:#{Time.now}] #{message}"
- end
+ add_transaction_tracer :perform, :category => :task
+ add_transaction_tracer :specs_index, :category => :task
+ add_transaction_tracer :latest_index, :category => :task
+ add_transaction_tracer :prerelease_index, :category => :task
end
Please sign in to comment.
Something went wrong with that request. Please try again.