Sha256: 40d28eddce165225013ab5736714ffc65950ddba8cec31eeabdefbf67d67b066

Contents?: true

Size: 678 Bytes

Versions: 2

Compression:

Stored size: 678 Bytes

Contents

# frozen_string_literal: true

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

            ::Restify::Adapter::Typhoeus.prepend Instrumentation
          end

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

    register 'Restify::Adapter::Typhoeus',
      'restify/adapter/typhoeus',
      Restify::Typhoeus::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/typhoeus.rb
mnemosyne-ruby-0.1.0 lib/mnemosyne/probes/restify/typhoeus.rb