Skip to content
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

Added tag parameter for custom MySQL queries #2229

Merged
merged 1 commit into from
Feb 1, 2016

Conversation

gzysk8
Copy link
Contributor

@gzysk8 gzysk8 commented Jan 27, 2016

Allow tags for MySQL custom queries, separate from the global tags applied to the default metrics

total_tags = tags + check['tags']
else:
total_tags = tags

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you could probably just do it all in a single line:
total_tags = tags + check.get('tags', [])

check.get('tags', []) will return en empty list if there's no tags in check, or checks['tags'] if it is... So it shortens it a bit.

As you said, here it comes down to readability vs space efficiency.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a comment - logic is 👍

@gzysk8 gzysk8 force-pushed the Grant/tags_for_custom_MySQL_queries branch from c945cdf to a7922f4 Compare January 27, 2016 21:05
@olivielpeau olivielpeau added this to the 5.7.0 milestone Feb 1, 2016
@olivielpeau
Copy link
Member

:shipit:

gzysk8 added a commit that referenced this pull request Feb 1, 2016
…ries

Added tag parameter for custom  MySQL queries
@gzysk8 gzysk8 merged commit 9f4ce40 into master Feb 1, 2016
@gzysk8 gzysk8 deleted the Grant/tags_for_custom_MySQL_queries branch February 1, 2016 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants