forked from LRDesign/logical-insight
-
-
Notifications
You must be signed in to change notification settings - Fork 22
Magic Panels
pboling edited this page Sep 14, 2012
·
3 revisions
Replicate this
class AwesomePanel < Rack::Insight::Panel
def initialize(app)
super
probe(self) do
# Will hook into all calls to HTTPClient#do_request
instrument("HTTPClient") do
instance_probe :do_request
end
# Will hook into all calls to FooBar#cache_request
instrument("FooBar") do
instance_probe :cache_request
end
end
table_setup('awesome')
end
end
as
Rack::Insight::Config.configure do |config|
config[:panel_configs][:awesome] = {
:probes => {
'HTTPClient' => [:instance, :do_request] ,
'FooBar' => [:instance, :cache_request]
}}
end