Module: Skylight::Probes::Rack::Builder::Instrumentation Private
- Defined in:
- lib/skylight/probes/rack_builder.rb
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
Instance Method Details
#use(middleware, *args, &block) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/skylight/probes/rack_builder.rb', line 6 def use(middleware, *args, &block) if @map mapping = @map @map = nil @use << proc { |app| generate_map(app, mapping) } end @use << proc do |app| middleware .new(app, *args, &block) .tap do |middleware_instance| Skylight::Probes::Middleware::Instrumentation.sk_instrument_middleware(middleware_instance) end end end |