mstar.observability.recorders#
Dependency-free accumulators for the families in catalog.
A process other than the API server keeps one recorder per family and sends
snapshot() on a message the API server already receives; the API server
exports the latest snapshot of each family. Snapshots are cumulative, never
deltas, so a lost or reordered message cannot corrupt a counter.
Not thread-safe: update and snapshot a recorder from one thread (an
EdgeTransfers hands latest to another thread whole).
Functions
|
One snapshot of |
Classes
|
|
|
One tensor manager's transfer families ( |
|
|
|
Fixed buckets from the family. |
|
One family's series, columnar so the wire codec encodes it typed. |
- class mstar.observability.recorders.Counter(family)[source]#
Bases:
Gauge- Parameters:
family (Family)
- class mstar.observability.recorders.EdgeTransfers(transport)[source]#
Bases:
objectOne tensor manager’s transfer families (
TRANSFER_BYTES,TRANSFERS,TRANSFER_SECONDS).transportis the manager’s protocol.recordonly appends to five columns;snapshotfolds them into one row per (src, dst) once per status interval, so an edge read creates no object and touches no per-edge state.latestis the lastpublish(): the data worker publishes from its own thread and the API server reads it from another, swapping whole lists.- Parameters:
transport (str)
- class mstar.observability.recorders.Gauge(family)[source]#
Bases:
object- Parameters:
family (Family)
- class mstar.observability.recorders.Histogram(family)[source]#
Bases:
objectFixed buckets from the family.
observebumps one bucket; the cumulative counts Prometheus wants are built atsnapshot.- Parameters:
family (Family)
- class mstar.observability.recorders.MetricSnapshot(name, label_values, values=<factory>, bucket_counts=<factory>, sums=<factory>)[source]#
Bases:
objectOne family’s series, columnar so the wire codec encodes it typed.
- Parameters:
- mstar.observability.recorders.merge(family, snapshots)[source]#
One snapshot of
familysumming the series ofsnapshotsthat share label values: several processes’ views of one deployment (the replicas of a graph node on different workers, say).- Parameters:
family (Family)
snapshots (Iterable[MetricSnapshot])
- Return type: