Conversation
|
Fix #2671 |
5f2885c to
2cf27c9
Compare
checks/libs/wmi/exceptions.py
Outdated
| return set_exception | ||
|
|
||
|
|
||
| def raise_on_com_error(error, silent=True): |
There was a problem hiding this comment.
What does silent do? I can't see where we use it...
There was a problem hiding this comment.
Oops this is a leftover.
Thanks for catching 🍥
|
Overall beautiful, as always, just have a question for you... |
|
Looks good to me! 👍 |
adcdccd to
c557471
Compare
|
Tests are failing on AppVeyor. Need to fix it before merging. |
c557471 to
a314390
Compare
d55d8fb to
ad084a7
Compare
Maintain a list of "known" WMI `com_errors`, and translate them to user intelligible errors. Add a `mute` parameter to `WMISampler`. * If set to `True` (default for system checks), `com_error` are "translated" (when possible), logged and do not cause any interruption. * If not (user checks), "translated" exceptions raise.
Unmute WMI `com_errors` exceptions related to an invalid `provider` option or WMI class.
ad084a7 to
1437cab
Compare
|
Partially ( Other improvements remain open in this PR. The logic need to be improved in order to differentiate errors with the same WMI COM error id. |
|
Hi @yannmh, Thanks again for your contribution, always very much appreciated. We're currently transitioning our checks to a new SDK-based model for the agent. An unfortunate side-effect is that we have to impose a freeze on the dd-agent repo. The SDK consists of two repositories https://github.com/DataDog/integrations-core and https://github.com/DataDog/integrations-extras, where all of our checks will reside. This PR would belong in the Also, in your case, you also have an agent core component in the PR, so please feel free to open a new PR just with the changes relevant to the core. We are very sorry for the inconvenience caused. Thank you for your patience as we make this transition! |
[wmi] friendly
com_errors💑Maintain a list of "known" WMI
com_errors, and translate them to userintelligible errors.
Add a
muteparameter toWMISampler.True(default for system checks),com_errorare"translated" (when possible), logged and do not cause any
interruption.
[wmi_check][iis] unmute various exceptions 🔊
Unmute WMI
com_errorsexceptions related to an invalidprovideroption or WMI class.