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.



32
33
34
35
36
# File 'lib/tcell_agent/sensor_events/sensor.rb', line 32

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

Instance Method Details

#post_processObject



37
38
39
40
41
42
43
44
# File 'lib/tcell_agent/sensor_events/sensor.rb', line 37

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