You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
No audit hook for sys.monitoring tools being cleared / freed #159379
The sys.monitoring.register_callback audit hook fires when a sys.monitoring callback gets installed or uninstalled by a call to sys.monitoring.register_callback, but there's no audit hook that fires when a sys.monitoring callback gets uninstalled by a call to sys.monitoring.clear_tool_id or sys.monitoring.free_tool_id.
Is this intentional, or an oversight? It seems strange that there are two ways to uninstall a tool's callback, one of which fires an audit event and one of which doesn't.
I was hoping to use audit hooks to detect when a sys.monitoring tool was disabled in the middle of trying to do its work, but no audit event firing for sys.monitoring.clear_tool_id makes that impossible.
I wouldn't consider it as a bug and rather as a feature for now. The problem is: what should we actually fire? the tool id and the corresponding function? sys.monitoring.register_callback only sends the func but doesn't explain what is done (we don't know the event for instance), so I already consider this as a bit partial. IMO a more precise event could be fired for that.
Activity
picnixz commentedon Oct 14, 2026
I wouldn't consider it as a bug and rather as a feature for now. The problem is: what should we actually fire? the tool id and the corresponding function?
sys.monitoring.register_callbackonly sends thefuncbut doesn't explain what is done (we don't know the event for instance), so I already consider this as a bit partial. IMO a more precise event could be fired for that.