lib/instana/instrumentation/excon.rb in instana-0.14.0 vs lib/instana/instrumentation/excon.rb in instana-0.14.2
- old
+ new
@@ -44,9 +44,15 @@
status = datum[:status]
if !status && datum.key?(:response) && datum[:response].is_a?(Hash)
status = datum[:response][:status]
end
+ if status.between?(500, 511)
+ # Because of the 5xx response, we flag this span as errored but
+ # without a backtrace (no exception)
+ ::Instana.tracer.log_error(nil)
+ end
+
if datum[:pipeline] == true
# Pickup context of this async span from datum[:instana_id]
::Instana.tracer.log_async_exit(:excon, { :http => {:status => status } }, datum[:instana_context])
else
::Instana.tracer.log_exit(:excon, { :http => {:status => status } })