-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Add a utility method to check if metadata collection is enabled #5748
Conversation
Codecov Report
|
datadog_checks_base/datadog_checks/base/utils/metadata/utils.py
Outdated
Show resolved
Hide resolved
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 seems overly complex. Why not just return a boolean?
The idea is to put annotations on methods handling metadata instead of having same if block everywere but I agree an utility wrapper over |
Considering that we'll need to have the utility wrapper (I don't think the decorator applies to every case), I think we should just do that. |
Co-Authored-By: Ofek Lev <[email protected]>
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.
🥇
Add decorator to check if metadata collection is enabled