Module: AppPerfRpm::Instruments::TyphoeusHydra

Defined in:
lib/app_perf_rpm/instruments/typhoeus.rb

Instance Method Summary collapse

Instance Method Details

#run_with_traceObject



37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# File 'lib/app_perf_rpm/instruments/typhoeus.rb', line 37

def run_with_trace
  span = ::AppPerfRpm.tracer.start_span("typhoeus", tags: {
    "component" => "Typhoeus",
    "method" => "hydra",
    "http.queued_requests" => queued_requests.count,
    "http.max_concurrency" => max_concurrency
  })
  AppPerfRpm::Utils.log_source_and_backtrace(span, :typhoeus)

  run_without_trace
rescue Exception => e
  if span
    span.set_tag('error', true)
    span.log_error(e)
  end
  raise
ensure
  span.finish if span
end