Method: NewRelic::Agent::InboundRequestMonitor#deserialize_header

Defined in:
lib/new_relic/agent/monitors/inbound_request_monitor.rb

#deserialize_header(encoded_header, key) ⇒ Object


33
34
35
36
37
38
39
40
# File 'lib/new_relic/agent/monitors/inbound_request_monitor.rb', line 33

def deserialize_header(encoded_header, key)
  decoded_header = obfuscator.deobfuscate(encoded_header)
  ::JSON.load(decoded_header)
rescue => err
  # If we have a failure of any type here, just return nil and carry on
  NewRelic::Agent.logger.debug("Failure deserializing encoded header '#{key}' in #{self.class}, #{err.class}, #{err.message}")
  nil
end