Skip to content

Commit

Permalink
Merge pull request #37 from weeyum/weeyum--add-newrelic-zk-tracing
Browse files Browse the repository at this point in the history
Enable Newrelic Zookeeper transaction tracing
  • Loading branch information
weeyum committed Jul 24, 2017
2 parents 46ad340 + b6e3a18 commit bcf6b81
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
6 changes: 5 additions & 1 deletion Gemfile
Expand Up @@ -5,7 +5,11 @@ gem 'zk', '~> 1.9.3'
gem 'unicorn', '~> 4.8.3'
gem 'unicorn-worker-killer', '~> 0.4.4'
gem 'hash-deep-merge', '~> 0.1.1'
gem 'newrelic_rpm', '~> 3.18.1', group: :newrelic
gem 'oj', '~> 3.3.2'
gem 'stomp', '~> 1.3.2'
gem 'statsd-ruby', '~> 1.2.1'

group :newrelic do
gem 'newrelic_rpm', '~> 3.18.1'
gem 'newrelic-zookeeper', '~> 1.0.0'
end
13 changes: 7 additions & 6 deletions config.ru
Expand Up @@ -22,6 +22,13 @@ end
require 'statsd-ruby'
STATSD = Statsd.new(opts['statsd_host'], opts['statsd_port'])

begin
require 'newrelic_rpm'
require 'newrelic-zookeeper'
rescue LoadError
log.info "Newrelic not found, skipping..."
end

# prepare to exit cleanly
$EXIT = false

Expand Down Expand Up @@ -87,11 +94,5 @@ Optica.set :store, store
Optica.set :events, events
Optica.set :ip_check, ip_check

begin
require 'newrelic_rpm'
rescue LoadError
log.info "Newrelic not found, skipping..."
end

log.info "Starting sinatra server..."
run Optica

0 comments on commit bcf6b81

Please sign in to comment.