Method: Datadog::Span#set_error
- Defined in:
- lib/ddtrace/span.rb
#set_error(e) ⇒ Object
Mark the span with the given error.
67 68 69 70 71 72 73 |
# File 'lib/ddtrace/span.rb', line 67 def set_error(e) return if e.nil? @status = 1 [Datadog::Ext::Errors::MSG] = e. if e.respond_to?(:message) && e. [Datadog::Ext::Errors::TYPE] = e.class.to_s [Datadog::Ext::Errors::STACK] = e.backtrace.join("\n") if e.respond_to?(:backtrace) && e.backtrace end |