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, #calculate_offset

Constructor Details

#initialize(request, response) ⇒ TCellHttpTxSensorEvent



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

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

Instance Method Details

#post_processObject



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

def post_process
  self['request'] = Util.request_sanitized_json(@raw_request) if defined? @raw_request

  self['response'] = Util.response_sanitized_json(@raw_response) if defined? @raw_response
end