Class: THTP::Server::Middleware::Skylight
- Inherits:
-
Object
- Object
- THTP::Server::Middleware::Skylight
- Defined in:
- lib/thtp/server/middleware.rb
Overview
Instruments RPCs for Skylight; requires Skylight to be initialised properly elsewhere
Instance Method Summary collapse
- #call(rpc, *rpc_args_and_opts) ⇒ Object
-
#initialize(app) ⇒ Skylight
constructor
A new instance of Skylight.
Constructor Details
#initialize(app) ⇒ Skylight
Returns a new instance of Skylight.
50 51 52 53 |
# File 'lib/thtp/server/middleware.rb', line 50 def initialize(app) require 'skylight' @app = app end |
Instance Method Details
#call(rpc, *rpc_args_and_opts) ⇒ Object
55 56 57 58 59 |
# File 'lib/thtp/server/middleware.rb', line 55 def call(rpc, *rpc_args_and_opts) ::Skylight.trace(rpc, 'rpc') do @app.call(rpc, *rpc_args_and_opts) end end |