Created
March 25, 2013 20:51
-
-
Save jasonrclark/5240610 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source 'https://rubygems.org' | |
gem 'thin' | |
gem 'sinatra' | |
gem 'newrelic_rpm' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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