-
Notifications
You must be signed in to change notification settings - Fork 120
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
gather some simple metrics on query and fetch time #144
Conversation
es_search_index = options[:es_search_index] | ||
path_prefix = options[:path_prefix] | ||
path_prefix[0] = '' if path_prefix[0]=='/' | ||
path_prefix[path_prefix.length-1] = '' if path_prefix[path_prefix.length-1]=='/' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is essentially duplicate code - perhaps pull out into a method and call it in all the *_url
methods?
@jamtur01 any chance we can get this done soon? |
I'll try to look at it later tonight. |
def response_is_bad(response) | ||
return true if response.nil? | ||
|
||
is_bad = response.status != 200 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The logic here could be simplified.
if response.status != 200
. . .
@jamtur01 any additional comments on how to make it better? |
I'll try another look later today. |
Thanks! |
gather some simple metrics on query and fetch time
Thanks as well. Are you able to tag another version in the next days? |
As I'd like to have some more insight into Elasticsearch during operations I added two metrics.