lib/routemaster/middleware/metrics.rb in routemaster-drain-3.6.2 vs lib/routemaster/middleware/metrics.rb in routemaster-drain-3.6.3

- old
+ new

@@ -1,13 +1,13 @@ module Routemaster module Middleware class Metrics INTERACTION_KEY = 'api_client'.freeze - def initialize(app, client: nil, source_peer: nil) + def initialize(app, options = {}) @app = app - @client = client - @source_peer = source_peer + @client = options[:client] + @source_peer = options[:source_peer] end def call(request_env) return @app.call(request_env) unless can_log?