lsst.dax.apdb g864b0138d7+aa38e45daa
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
lsst.dax.apdb.monitor.MonAgent Class Reference

Public Member Functions

 __init__ (self, str name="")
 
None add_record (self, str name, *Mapping[str, Any] values, Mapping[str, str|int]|None tags=None, float|None timestamp=None)
 
AbstractContextManager[None] context_tags (self, _TagsType tags)
 

Protected Attributes

 _name
 
 _service
 

Detailed Description

Client-side interface for adding monitoring records to the monitoring
service.

Parameters
----------
name : `str`
    Client agent name, this is used for filtering of the records by the
    service and ia also passed to monitoring handler as ``agent_name``.

Member Function Documentation

◆ add_record()

None lsst.dax.apdb.monitor.MonAgent.add_record ( self,
str name,
*Mapping[str, Any] values,
Mapping[str, str | int] | None tags = None,
float | None timestamp = None )
Send one record to monitoring service.

Parameters
----------
name : `str`
    Record name, arbitrary string.
values : `~collections.abc.Mapping` [`str`, `Any`]
    Values associated with the record, usually never empty.
tags : `~collections.abc.Mapping` [`str`, `str` or `int`]
    Tags associated with the record, may be empty.
timestamp : `str`
    Time in seconds since UNIX epoch when record originated.

◆ context_tags()

AbstractContextManager[None] lsst.dax.apdb.monitor.MonAgent.context_tags ( self,
_TagsType tags )
Context manager that adds a set of tags to all records created
inside the context.

Parameters
----------
tags : `~collections.abc.Mapping` [`str`, `str` or `int`]
    Tags associated with the records.

Notes
-----
All calls to `add_record` that happen inside the corresponding context
will add tags specified in this call. Tags specified in `add_record`
will override matching tag names that are passed to this method. On
exit from context a previous tag context is restored (which may be
empty).

The documentation for this class was generated from the following file: