Problem/Motivation
Currently Vitals does not allow modules to modify the response that will be sent when viewing the /vitals/{token} url.
Consider the following example:
- The vitals endpoint for a site is monitored and an alert is raised if any modules show pending security updates.
- A security release was recently issued for a module.
- Due to the complexity of the update, the security release cannot be applied quickly. However, a patch has been added to resolve the security vulnerability.
In this scenario, there is no simple way to prevent the patched module from appearing in the vitals reponse. A developer could technically create their own VitalsCheck plugin to override the "updates" VitalsCheck plugin, but it would be much easier if the VitalsCheck plugins could instead allow other modules a chance to alter their response.
Steps to reproduce
N/A
Proposed resolution
My current thought is to have a $this->moduleHandler->alter('my_custom_data', $my_data); in some sort of base VitalsCheck class.
I may also consider a second alter hook for the complete vitals response before it is sent. That could potentially be useful to add in some extra data without needing to implement a complete VitalsCheck plugin.
Remaining tasks
Plan the implementationImplementationDocumentationAdd tests
User interface changes
N/A
API changes
I don't think there will be any official API changes, but will update this section if that changes.
Data model changes
N/A
Issue fork vitals-3609720
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #6
daceej commentedComment #8
daceej commentedComment #11
daceej commented