Module: Chronos::ObservabilityFacade
- Included in:
- Chronos
- Defined in:
- lib/chronos/observability_facade.rb
Overview
Public entry points for optional observability and deployment integrations.
Instance Method Summary collapse
- #cache_integration_options ⇒ Object
- #external_http_integration_options ⇒ Object
- #instrument_net_http(connection, options = {}) ⇒ Object
- #notify_deploy(attributes = {}, timeout = Agent::DEFAULT_FLUSH_TIMEOUT) ⇒ Object
- #report_dependencies ⇒ Object
Instance Method Details
#cache_integration_options ⇒ Object
36 37 38 39 40 41 |
# File 'lib/chronos/observability_facade.rb', line 36 def agent = current_agent agent ? agent. : {:project_id => "", :key_mode => :none} rescue StandardError {:project_id => "", :key_mode => :none} end |
#external_http_integration_options ⇒ Object
29 30 31 32 33 34 |
# File 'lib/chronos/observability_facade.rb', line 29 def agent = current_agent agent ? agent. : {:enabled => false} rescue StandardError {:enabled => false} end |
#instrument_net_http(connection, options = {}) ⇒ Object
43 44 45 46 47 48 |
# File 'lib/chronos/observability_facade.rb', line 43 def instrument_net_http(connection, = {}) require "chronos/net_http" Integrations::NetHttp.install(connection, .merge(:notifier => self)) rescue StandardError false end |
#notify_deploy(attributes = {}, timeout = Agent::DEFAULT_FLUSH_TIMEOUT) ⇒ Object
22 23 24 25 26 27 |
# File 'lib/chronos/observability_facade.rb', line 22 def notify_deploy(attributes = {}, timeout = Agent::DEFAULT_FLUSH_TIMEOUT) agent = current_agent agent ? agent.notify_deploy(attributes, timeout) : false rescue StandardError false end |
#report_dependencies ⇒ Object
15 16 17 18 19 20 |
# File 'lib/chronos/observability_facade.rb', line 15 def report_dependencies agent = current_agent agent ? agent.report_dependencies : false rescue StandardError false end |