-
Notifications
You must be signed in to change notification settings - Fork 814
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
[mysql] custom query metrics #1673
Conversation
# Max of 20 queries allowed | ||
if isinstance(queries, list): | ||
for index, check in enumerate(queries): | ||
if index == self.MAX_CUSTOM_QUERIES: |
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.
Instead of checking this condition everytime, maybe we can just trim the list to at most self.MAX_CUSTOM_QUERIES
elems before iterating: for index, check in enumerate(queries[:self.MAX_CUSTOM_QUERIES])
The warning can be logged just based on len(queries)
Maybe there should be some notion of a timeout when executing custom queries. We're currently not putting any guards around how complex a query can be, and are at risk of having the agent block for indefinite periods if the query is long-running. I'd suggest we configure a |
@garnermccloud any thoughts on the above suggestion? |
Thanks for the comments @talwai - I'll update and rebase |
Can you squash your commits @garnermccloud to clean up the git history please ? |
Closing in favor of #1793 |
Allow metrics to be generated from custom mysql queries.
Added logging, testing to #1274 and rebased.