LSST Applications g0603fd7c41+022847dfd1,g0aad566f14+f45185db35,g180d380827+40e913b07a,g2079a07aa2+86d27d4dc4,g2305ad1205+696e5f3872,g2bbee38e9b+047b288a59,g337abbeb29+047b288a59,g33d1c0ed96+047b288a59,g3a166c0a6a+047b288a59,g3d1719c13e+f45185db35,g3de15ee5c7+5201731f0d,g487adcacf7+19f9b77d7d,g50ff169b8f+96c6868917,g52b1c1532d+585e252eca,g591dd9f2cf+248b16177b,g63cd9335cc+585e252eca,g858d7b2824+f45185db35,g88963caddf+0cb8e002cc,g991b906543+f45185db35,g99cad8db69+1747e75aa3,g9b9dfce982+78139cbddb,g9ddcbc5298+9a081db1e4,ga1e77700b3+a912195c07,gae0086650b+585e252eca,gb0e22166c9+60f28cb32d,gb3a676b8dc+b4feba26a1,gb4b16eec92+f82f04eb54,gba4ed39666+c2a2e4ac27,gbb8dafda3b+215b19b0ab,gc120e1dc64+b0284b5341,gc28159a63d+047b288a59,gc3e9b769f7+dcad4ace9a,gcf0d15dbbd+78139cbddb,gdaeeff99f8+f9a426f77a,ge79ae78c31+047b288a59,w.2024.19
LSST Data Management Base Package
|
Public Member Functions | |
None | set_filters (self, Iterable[str] rules) |
Iterable[MonHandler] | handlers (self) |
None | add_handler (self, MonHandler handler) |
None | remove_handler (self, MonHandler handler) |
Iterator[None] | context_tags (self, _TagsType tags) |
Protected Member Functions | |
None | _add_record (self, *str agent_name, str record_name, Mapping[str, Any] values, Mapping[str, str|int]|None tags=None, float|None timestamp=None) |
_TagsType|None | _add_context_tags (self, _TagsType tags) |
Protected Attributes | |
_filters | |
_context_tags | |
Static Protected Attributes | |
list | _handlers = [] |
_TagsType | _context_tags = None |
list | _filters = [] |
Class implementing monitoring service functionality. Notes ----- This is a singleton class which serves all client agents in an application. It accepts records from agents, filters it based on a set of configured rules and forwards them to one or more configured handlers. By default there are no handlers defined which means that all records are discarded. Default set of filtering rules is empty which accepts all agent names. To produce a useful output from this service one has to add at least one handler using `add_handler` method (e.g. `LoggingMonHandler` instance). The `set_filters` methods can be used to specify the set of filtering rules.
Definition at line 187 of file monitor.py.
|
protected |
Extend the tag context with new tags, overriding any tags that may already exist in a current context.
Definition at line 308 of file monitor.py.
|
protected |
Add one monitoring record, this method is for use by agents only.
Definition at line 250 of file monitor.py.
None lsst.dax.apdb.monitor.MonService.add_handler | ( | self, | |
MonHandler | handler ) |
Add one monitoring handler. Parameters ---------- handler : `MonHandler` Handler instance.
Definition at line 286 of file monitor.py.
Iterator[None] lsst.dax.apdb.monitor.MonService.context_tags | ( | self, | |
_TagsType | tags ) |
Context manager that adds a set of tags to all records created inside the context. Typically clients will be using `MonAgent.context_tags`, which forwards to this method.
Definition at line 322 of file monitor.py.
Iterable[MonHandler] lsst.dax.apdb.monitor.MonService.handlers | ( | self | ) |
Set of handlers defined currently.
Definition at line 282 of file monitor.py.
None lsst.dax.apdb.monitor.MonService.remove_handler | ( | self, | |
MonHandler | handler ) |
Add one monitoring handler. Parameters ---------- handler : `MonHandler` Handler instance.
Definition at line 297 of file monitor.py.
None lsst.dax.apdb.monitor.MonService.set_filters | ( | self, | |
Iterable[str] | rules ) |
Define a sequence of rules for filtering of the agent names. Parameters ---------- rules : `~collections.abc.Iterable` [`str`] Ordered collection of rules. Each string specifies filtering rule for a single name, or catch-all rule. The rule consist of the agent name prefixed by minus or optional plus sign. Catch-all rule uses name "any". If the rule starts with minus sign then matching agent will be rejected. Otherwise matching agent is accepted. Notes ----- The catch-all rule (`-any`, `+any`, or `any`) can be specified in any location in the sequence but it is always applied last. E.g. `["-any", "+agent1"]` behaves the same as `["+agent1", "-any"]`. If the set of rues does not include catch-all rule, filtering behaves as if it is added implicitly as `+any`. Filtering code evaluates each rule in order. First rule that matches the agent name wins. Agent names are matched literally, wildcards are not supported and there are no parent/child relations between agent names (e.g `lsst.dax.apdb` and `lsst.dax.apdb.sql` are treated as independent names).
Definition at line 213 of file monitor.py.
|
staticprotected |
Definition at line 207 of file monitor.py.
|
protected |
Definition at line 314 of file monitor.py.
|
staticprotected |
Definition at line 210 of file monitor.py.
|
protected |
Definition at line 240 of file monitor.py.
|
staticprotected |
Definition at line 204 of file monitor.py.