class Elasticity::InstrumentedClient

Constants

INDEX_METHODS
INDICES_METHODS

Public Class Methods

new(client) click to toggle source
# File lib/elasticity/instrumented_client.rb, line 6
def initialize(client)
  @client = client
end

Public Instance Methods

versions() click to toggle source
# File lib/elasticity/instrumented_client.rb, line 10
def versions
  (@client.cluster.stats["nodes"] && @client.cluster.stats["nodes"]["versions"]) || []
end

Private Instance Methods

instrument(name, args) { || ... } click to toggle source
# File lib/elasticity/instrumented_client.rb, line 36
def instrument(name, args)
  ActiveSupport::Notifications.instrument("#{name}.elasticity", args: args, backtrace: caller(1)) do
    yield
  end
end