Class: Promenade::Client::Rack::MiddlwareBase

Inherits:
Object
  • Object
show all
Defined in:
lib/promenade/client/rack/middleware_base.rb

Instance Method Summary collapse

Constructor Details

#initialize(app, registry:, label_builder:) ⇒ MiddlwareBase

Returns a new instance of MiddlwareBase.



5
6
7
8
9
10
11
# File 'lib/promenade/client/rack/middleware_base.rb', line 5

def initialize(app, registry:, label_builder:)
  @app = app
  @registry = registry
  @label_builder = label_builder

  register_metrics!
end

Instance Method Details

#call(env) ⇒ Object



13
14
15
# File 'lib/promenade/client/rack/middleware_base.rb', line 13

def call(env)
  trace(env) { app.call(env) }
end