Skip to content

Instantly share code, notes, and snippets.

@jasonrclark
Created March 25, 2013 20:51
Show Gist options
  • Save jasonrclark/5240610 to your computer and use it in GitHub Desktop.
Save jasonrclark/5240610 to your computer and use it in GitHub Desktop.
source 'https://rubygems.org'
gem 'thin'
gem 'sinatra'
gem 'newrelic_rpm'
require 'sinatra'
require 'newrelic_rpm'
require 'new_relic/agent/instrumentation/sinatra'
module API
module V2
class Ping < Sinatra::Base
# Got naming erors for missing constants so I'm forcing top-level here
include ::NewRelic::Agent::Instrumentation::Sinatra
include ::NewRelic::Agent::Instrumentation::ControllerInstrumentation
def ignore_apdex?
true
end
# Are these from another gem?
#version 'v2'
#prefix '/'
before do
content_type 'application/json'
end
get '/haproxy_ping' do
200
sleep 5
body "OK"
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment