Class: Elasticsearch::Rails::Lograge::Railtie

Inherits:
Rails::Railtie
  • Object
show all
Defined in:
lib/elasticsearch/rails/lograge.rb

Overview

Rails initializer class to require Elasticsearch::Rails::Instrumentation files, set up Elasticsearch::Model and add Lograge configuration to display Elasticsearch-related duration

Require the component in your ‘application.rb` file and enable Lograge:

require 'elasticsearch/rails/lograge'

You should see the full duration of the request to Elasticsearch as part of each log event:

method=GET path=/search ... status=200 duration=380.89 view=99.64 db=0.00 es=279.37