Class: OneApm::Agent::InboundRequestMonitor
- Inherits:
-
Object
- Object
- OneApm::Agent::InboundRequestMonitor
- Defined in:
- lib/one_apm/agent/inbound_request_monitor.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#obfuscator ⇒ Object
readonly
Returns the value of attribute obfuscator.
Instance Method Summary collapse
- #deserialize_header(encoded_header, key) ⇒ Object
-
#initialize(events) ⇒ InboundRequestMonitor
constructor
A new instance of InboundRequestMonitor.
- #setup_obfuscator ⇒ Object
Constructor Details
#initialize(events) ⇒ InboundRequestMonitor
Returns a new instance of InboundRequestMonitor.
9 10 11 12 13 14 |
# File 'lib/one_apm/agent/inbound_request_monitor.rb', line 9 def initialize(events) events.subscribe(:finished_configuring) do setup_obfuscator on_finished_configuring(events) end end |
Instance Attribute Details
#obfuscator ⇒ Object (readonly)
Returns the value of attribute obfuscator.
7 8 9 |
# File 'lib/one_apm/agent/inbound_request_monitor.rb', line 7 def obfuscator @obfuscator end |
Instance Method Details
#deserialize_header(encoded_header, key) ⇒ Object
20 21 22 23 24 25 26 |
# File 'lib/one_apm/agent/inbound_request_monitor.rb', line 20 def deserialize_header(encoded_header, key) decoded_header = obfuscator.deobfuscate(encoded_header) OneApm::JSONWrapper.load(decoded_header) rescue => err OneApm::Manager.logger.debug("Failure deserializing encoded header '#{key}' in #{self.class}, #{err.class}, #{err.}") nil end |