def instrument( path, body, params )
      payload = {
        :index        => params[:index],
        :type         => params[:type],
        :action       => params[:action],
        :context      => params[:context],
        :request_body => body,
        :body         => body   # for backwards compatibility
      }

      ::Elastomer::Notifications.service.instrument(NAME, payload) do
        response = yield
        payload[:url]           = response.env[:url]
        payload[:method]        = response.env[:method]
        payload[:status]        = response.status
        payload[:response_body] = response.body
        payload[:retries]       = params[:retries]
        response
      end
    end
def instrument( path, body, params )
      payload = {
        :index        => params[:index],
        :type         => params[:type],
        :action       => params[:action],
        :context      => params[:context],
        :request_body => body,
        :body         => body   # for backwards compatibility
      }

      ::Elastomer::Notifications.service.instrument(NAME, payload) do
        response = yield
        payload[:url]           = response.env[:url]
        payload[:method]        = response.env[:method]
        payload[:status]        = response.status
        payload[:response_body] = response.body
        payload[:retries]       = params[:retries]
        response
      end
    end
Internal: Execute the given block and provide instrumentation info to
 subscribers. The name we use for subscriptions is
 `request.client.elastomer` and a supplemental payload is provided with
 more information about the specific Elasticsearch request.

 path   - The full request path as a String
 body   - The request body as a String or `nil`
 params - The request params Hash
 block  - The block that will be instrumented

 Returns the response from the block