module HoneycombRails::Extensions::ActionController::InstanceMethods
Attributes
honeycomb_metadata[R]
Hash of metadata to be added to the event we will send to Honeycomb for the current request.
To annotate the event with custom information (e.g. from a particular controller action), just add data to this hash: e.g.
honeycomb_metadata[:num_posts] = @posts.size
@return [Hash<String=>Any>]
Public Class Methods
included(controller_class)
click to toggle source
Calls superclass method
# File lib/honeycomb-rails/extensions/action_controller.rb, line 5 def self.included(controller_class) super install_before_filter!(controller_class) do honeycomb_initialize end end
install_before_filter!(controller_class, &block)
click to toggle source
# File lib/honeycomb-rails/extensions/action_controller.rb, line 13 def self.install_before_filter!(controller_class, &block) raise ArgumentError unless block_given? if ::Rails::VERSION::MAJOR < 4 controller_class.before_filter(&block) else controller_class.before_action(&block) end end
Public Instance Methods
honeycomb_initialize()
click to toggle source
# File lib/honeycomb-rails/extensions/action_controller.rb, line 22 def honeycomb_initialize @honeycomb_metadata = {} end