Sha256: da986f77ea06db81eac01240d06d9ec2c83c98f507a4fc005dcb2440589940ee

Contents?: true

Size: 685 Bytes

Versions: 2

Compression:

Stored size: 685 Bytes

Contents

# frozen_string_literal: true

module Mnemosyne
  module Probes
    module Restify
      module EM
        class Probe < ::Mnemosyne::Probe
          def setup
            require 'mnemosyne/middleware/restify'

            ::Restify::Adapter::EM::Connection.prepend Instrumentation
          end

          module Instrumentation
            def call(request, writer, *args)
              ::Mnemosyne::Middleware::Restify.call(request, writer) do |r, w|
                super(r, w, *args)
              end
            end
          end
        end
      end
    end

    register 'Restify::Adapter::EM::Connection',
      'restify/adapter/em',
      Restify::EM::Probe.new
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
mnemosyne-ruby-0.2.0 lib/mnemosyne/probes/restify/em.rb
mnemosyne-ruby-0.1.0 lib/mnemosyne/probes/restify/em.rb