Module: HoneycombRails

Defined in:
lib/honeycomb-rails.rb,
lib/honeycomb-rails/config.rb,
lib/honeycomb-rails/railtie.rb,
lib/honeycomb-rails/constants.rb,
lib/honeycomb-rails/subscribers/active_record.rb,
lib/honeycomb-rails/subscribers/process_action.rb,
lib/honeycomb-rails/extensions/action_controller.rb,
lib/honeycomb-rails/overrides/action_controller_instrumentation.rb

Defined Under Namespace

Modules: Constants, Extensions, Overrides, Subscribers Classes: Config, Railtie

Class Method Summary collapse

Class Method Details

.configObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



77
78
79
# File 'lib/honeycomb-rails/config.rb', line 77

def config
  @config ||= Config.new
end

.configure {|Config| ... } ⇒ Object

Run this at app initialization time to configure honeycomb-rails. e.g.

HoneycombRails.configure do |conf|
  conf.writekey = 'abc123def'
end

See Config for available options.

Yields:

  • (Config)

    the singleton config.



18
19
20
21
22
23
# File 'lib/honeycomb-rails.rb', line 18

def configure
  raise "Please pass a block to #{name}#configure" unless block_given?

  yield config
  config
end

.reset_config_to_default!Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

For test use only



83
84
85
# File 'lib/honeycomb-rails/config.rb', line 83

def reset_config_to_default!
  @config = Config.new
end