Class: RooOnRails::Checks::Heroku::MetricsBridgeConfigured
- Inherits:
-
EnvSpecific
- Object
- Base
- EnvSpecific
- RooOnRails::Checks::Heroku::MetricsBridgeConfigured
- Defined in:
- lib/roo_on_rails/checks/heroku/metrics_bridge_configured.rb
Overview
Checks that the Heroku-Datadog metrics bridge is configured to accept logs from the app.
Input context
-
heroku.api_client: a connected PlatformAPI client
-
heroku.app.EnvSpecific#env: an existing app name.
Output context:
-
heroku.metric_bridge_token.EnvSpecific#env: the password for the metrics bridge
Constant Summary collapse
- BRIDGE_APP =
'roo-dd-bridge-production'.freeze
Instance Attribute Summary
Attributes inherited from EnvSpecific
Instance Method Summary collapse
Methods inherited from EnvSpecific
Methods inherited from Base
Methods included from RooOnRails::Checks::Helpers
Constructor Details
This class inherits a constructor from RooOnRails::Checks::EnvSpecific
Instance Method Details
#call ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 |
# File 'lib/roo_on_rails/checks/heroku/metrics_bridge_configured.rb', line 28 def call config = current_config names = config[app_list_var].split(',') fail! 'Bridge does not allow this app' unless names.include? app_name fail! 'Bridge lacks credentials for this app' unless config[token_var] fail! 'Bridge lacks tags for this app' unless config[] pass "Bridge is configured for #{bold app_name}" context.heroku.metric_bridge_token![env] = config[token_var] end |
#intro ⇒ Object
24 25 26 |
# File 'lib/roo_on_rails/checks/heroku/metrics_bridge_configured.rb', line 24 def intro 'Checking whether metrics bridge is configured...' end |