Module: HTTPInstrumentation::Instrumentation::EthonHook::Easy
- Defined in:
- lib/http_instrumentation/instrumentation/ethon_hook.rb
Class Attribute Summary collapse
-
.aliased ⇒ Object
Returns the value of attribute aliased.
Instance Method Summary collapse
Class Attribute Details
.aliased ⇒ Object
Returns the value of attribute aliased.
49 50 51 |
# File 'lib/http_instrumentation/instrumentation/ethon_hook.rb', line 49 def aliased @aliased end |
Instance Method Details
#http_request(url, action_name, *args) ⇒ Object
52 53 54 55 56 57 58 59 60 |
# File 'lib/http_instrumentation/instrumentation/ethon_hook.rb', line 52 def http_request(url, action_name, *args) @http_instrumentation_method = action_name @http_instrumentation_url = url if HTTPInstrumentation::Instrumentation::EthonHook::Easy.aliased http_request_without_http_instrumentation(url, action_name, *args) else super end end |
#perform(*args) ⇒ Object
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/http_instrumentation/instrumentation/ethon_hook.rb', line 62 def perform(*args) HTTPInstrumentation.instrument("ethon") do |payload| payload[:http_method] = @http_instrumentation_method begin payload[:url] = (@http_instrumentation_url || url) rescue payload[:url] = @http_instrumentation_url end # Clear the request info so it isn't reported again if the handle # is reused without going through http_request. @http_instrumentation_method = nil @http_instrumentation_url = nil retval = if HTTPInstrumentation::Instrumentation::EthonHook::Easy.aliased perform_without_http_instrumentation(*args) else super end begin payload[:status_code] = response_code rescue end retval end end |