Fix issue #8419: Document get_impl and import_from (#8420)

Co-authored-by: Engel Nyst <enyst@users.noreply.github.com>
This commit is contained in:
OpenHands
2025-06-04 09:23:53 +08:00
committed by GitHub
parent b771fb6e32
commit 6c34e5850b
13 changed files with 262 additions and 13 deletions

View File

@@ -3,8 +3,15 @@ from openhands.events.event import Event
class MonitoringListener:
"""
Allow tracking of application activity for monitoring purposes.
"""Abstract base class for monitoring application activity.
This is an extension point in OpenHands that allows applications to customize how
application activity is monitored. Applications can substitute their own implementation by:
1. Creating a class that inherits from MonitoringListener
2. Implementing desired methods (all methods have default no-op implementations)
3. Setting server_config.monitoring_listener_class to the fully qualified name of the class
The class is instantiated via get_impl() in openhands.server.shared.py.
Implementations should be non-disruptive, do not raise or block to perform I/O.
"""