class ElasticAPM::ErrorBuilder
def build_exception(exception, context: nil, handled: true)
def build_exception(exception, context: nil, handled: true) error = Error.new context: context || Context.new error.exception = Error::Exception.new(exception, handled: handled) Util.reverse_merge!(error.context.tags, @agent.config.default_tags) if exception.backtrace add_stacktrace error, :exception, exception.backtrace end add_current_transaction_fields error, ElasticAPM.current_transaction error end