vendor/bundle/jruby/2.3.0/gems/logstash-input-http_poller-4.0.5/lib/logstash/inputs/http_poller.rb
# Beware, on old versions of manticore some uncommon failures are not handled
Beware, on old versions of manticore some uncommon failures are not handled
Beware on old versions of manticore some uncommon failures are not handled
def handle_failure(queue, name, request, exception, execution_time)
    event = LogStash::Event.new
    apply_metadata(event, name, request)
    event.tag("_http_request_failure")
    event.set("http_request_failure", {
      "request" => structure_request(request),
      "name" => name,
      "error" => exception.to_s,
      "backtrace" => exception.backtrace,
      "runtime_seconds" => execution_time
   })
    queue << event
  rescue StandardError, java.lang.Exception => e
      @logger.error? && @logger.error("Cannot read URL or send the error as an event!",
                                      :exception => e,
                                      :exception_message => e.message,
                                      :exception_backtrace => e.backtrace,
                                      :name => name)
      @logger.debug? && @logger.debug("Cannot read URL or send the error as an event!",
                                      :exception => e,
                                      :exception_message => e.message,
                                      :exception_backtrace => e.backtrace,
                                      :name => name,
                                      :url => request)
  end
def handle_failure ( queue , name , request , exception , execution_time ) event = LogStash :: Event . new apply_metadata ( event , name , request ) event . tag ( "_http_request_failure" ) event . set ( "http_request_failure" , { "request" => structure_request ( request ) , "name" => name , "error" => exception . to_s , "backtrace" => exception . backtrace , "runtime_seconds" => execution_time } ) queue << event rescue StandardError , java . lang . Exception => e @logger . error? && @logger . error ( "Cannot read URL or send the error as an event!" , :exception => e , :exception_message => e . message , :exception_backtrace => e . backtrace , :name => name ) @logger . debug? && @logger . debug ( "Cannot read URL or send the error as an event!" , :exception => e , :exception_message => e . message , :exception_backtrace => e . backtrace , :name => name , :url => request ) end
Beware, on old versions of manticore some uncommon failures are not handled
Beware on old versions of manticore some uncommon failures are not handled
# This is also in the metadata, but we send it anyone because we want this # persisted by default, whereas metadata isn't. People don't like mysterious errors # If we are running in debug mode we can display more information about the # specific request which could give more details about the connection.
queue
<not_specific>
name
<not_specific>
request
<not_specific>
exception
<not_specific>
execution_time
<not_specific>