Monitor
Monitor combines Tracer, Collector and Filter by Manager to provide an entry point for the polling, filtering and collecting of the data.
Poller is used to poll the data periodically.
- class duetector.monitors.base.Monitor(config: dict[str, Any] | None = None, *args, **kwargs)[source]
Bases:
ConfiguableA base class for all monitors
A monitor is a collection of tracers, filters and collectors, record host and tracer, provide a way to poll data
- property backend_args
Config for
self._backend_imp.
- config_scope: str | None = 'monitor'
Config scope for monitor.
- default_config = {'backend_args': {'max_workers': 10}, 'disabled': False, 'poller': {'call_when_shutdown': True, 'interval_ms': 500}}
Default config for monitor.
- Two sub-configs are available:
backend_args: config for
self._backend_imppoller: config for
Poller
- property disabled
If disabled, no tracers, filters, collectors will be initialized.
- injectors: list[Injector]
A list of collectors, should be initialized by
InjectorManager