-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bulk helper should instrument entire operation #105
Comments
How will the arguments to Client#instrument for the entire operation differ from the individual bulk requests? It seems appropriate to avoid ambiguity between the two different concepts by passing a different Here is the bulk request: https://github.com/github/elastomer-client/blob/master/lib/elastomer/client/bulk.rb#L41 |
I'm thinking we could omit the body, keep the path the same, and set the action to something synthetic, like Maybe something like this: def bulk( body = nil, params = nil )
if block_given?
params, body = (body || {}), nil
instrument(path, body, params.merge(:action => "bulk.block") do
yield bulk_obj = Bulk.new(self, params)
bulk_obj.call
end
else What do you think @TwP? |
|
I'm on the fence about instrumenting an entire block of bulk operations. The resulting metric will be a weird superposition of application timing information and Elasticsearch timing information. If it were possible to aggregate just the Elasticsearch timing information and store that as a single metric, then I would be 👍💯 Diving a little bit into implementation, we could achieve this by accumulating the timing data in the That seems like the best path forward to me. Just my $0.02 |
Getting the timing data from Elasticsearch would be easy using bulk_stream_responses in #112, but it doesn't look like there is a way to override the http://api.rubyonrails.org/classes/ActiveSupport/Notifications/Instrumenter.html#method-i-instrument The application timing could also affect |
The Bulk helper can issue multiple requests behind the scenes if requested. In this case we should instrument the entire operation as a single action in addition to the underlying scan/bulk request actions.
The text was updated successfully, but these errors were encountered: