Class: Contrast::Agent::Reporting::Telemetry::Interface
- Inherits:
-
Client::InterfaceBase
- Object
- Client::InterfaceBase
- Contrast::Agent::Reporting::Telemetry::Interface
- Defined in:
- lib/contrast/agent/reporting/client/interface.rb
Overview
Interface to safely manage connections across threads.
Constant Summary collapse
- URL =
'https://telemetry.ruby.contrastsecurity.com/'
Instance Method Summary collapse
-
#connected? ⇒ Boolean
Check to see if client exists and there is connection.
-
#request_with_response(event) ⇒ Object
Starts telemetry request.
Methods inherited from Client::InterfaceBase
Instance Method Details
#connected? ⇒ Boolean
Check to see if client exists and there is connection
104 105 106 107 108 109 110 |
# File 'lib/contrast/agent/reporting/client/interface.rb', line 104 def connected? with_monitor do return true if telemetry_client && telemetry_connection false end end |
#request_with_response(event) ⇒ Object
Starts telemetry request.
113 114 115 116 117 |
# File 'lib/contrast/agent/reporting/client/interface.rb', line 113 def request_with_response event with_monitor do telemetry_client.handle_response(telemetry_client.send_request(event, telemetry_connection)) end end |