Class: TCellAgent::SensorEvents::TCellHttpTxSensorEvent

Inherits:
TCellSensorEvent show all
Defined in:
lib/tcell_agent/sensor_events/sensor.rb

Instance Attribute Summary

Attributes inherited from TCellSensorEvent

#ensure, #flush, #send

Instance Method Summary collapse

Methods inherited from TCellSensorEvent

#bucket_key, #calculateOffset

Constructor Details

#initialize(request, response) ⇒ TCellHttpTxSensorEvent

Returns a new instance of TCellHttpTxSensorEvent.



36
37
38
39
40
# File 'lib/tcell_agent/sensor_events/sensor.rb', line 36

def initialize(request, response)
  super("http_tx")
  @raw_request = request
  @raw_response = response
end

Instance Method Details

#post_processObject



41
42
43
44
45
46
47
48
# File 'lib/tcell_agent/sensor_events/sensor.rb', line 41

def post_process
  if defined?@raw_request
    self["request"] = Util.request_sanitized_json(@raw_request)
  end
  if defined?@raw_response
    self["response"] = Util.response_sanitized_json(@raw_response)
  end
end