Sha256: d18fd6efbf4ec483bc572790dadd2cdaa09ffc06d7a2cad27a3d882800fa8ebd

Contents?: true

Size: 400 Bytes

Versions: 4

Compression:

Stored size: 400 Bytes

Contents

Net::HTTP.class_eval do
  alias request_without_appsignal request

  def request(request, body=nil, &block)
    ActiveSupport::Notifications.instrument(
      'request.net_http',
      :host => request['host'],
      :scheme => use_ssl? ? 'https' : 'http',
      :path => request.path,
      :method => request.method
    ) do
      request_without_appsignal(request, body, &block)
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
appsignal-0.9.1 lib/appsignal/instrumentations/net_http.rb
appsignal-0.9.0 lib/appsignal/instrumentations/net_http.rb
appsignal-0.9.0.beta.1 lib/appsignal/instrumentations/net_http.rb
appsignal-0.9.0.alpha.1 lib/appsignal/instrumentations/net_http.rb