Skip to main content

sgnmon

Monitoring and metrics for SGN streaming pipelines

ci coverage documentation pypi version


Prometheus metrics, health checks, and a live dashboard for SGN pipelines, attached without changing the pipeline graph.

Installation

pip install sgnmon

Quickstart

Any sgn application, no code changes:

$ sgnmon run --port 9090 -- sgn-cal --config config.yaml --model model.npz
[sgnmon] dashboard: http://localhost:9090/

A pipeline you build yourself:

from sgnmon import Monitor, MonitorServer

monitor = Monitor()
monitor.tap(pipeline)  # observe every pad, no graph changes

with MonitorServer(monitor, port=9090):
    pipeline.run(health=monitor)  # lifecycle for /readyz and /healthz

From the shell:

$ sgnmon check http://localhost:9090   # health report; exit 0 / 1 / 2
$ sgnmon demo --port 9090              # a monitored example pipeline

What you get

Attach Taps at three observation points per element (frames produced, received, and consumed after the audioadapter), in-graph MonitorTransform/MonitorSink elements, or sgnmon run for zero-code attach
Metrics /metrics: frame and gap counts, data/gap seconds, samples, latency histograms, per-pad execution time, freshness, EOS; opt-in process metrics; application metrics via MetricSpec/MetricsMixin
Windows Rates, gap fractions and latencies over a 5 s ... 6 h trailing-window ladder on /status, for sub-minute resolution and consumers without PromQL
Health Default checks (data freshness, throughput, latency drift) that self-pace their startup, opt-in latency/gap/EOS checks; /health and /health/<check> (503 on failure), /readyz and /healthz driven by the pipeline's own lifecycle
Dashboard A self-contained live view of the pipeline graph with per-element rates, latencies, gap fractions and health; composed elements expand in place
Push PushExporter POSTs the exposition to VictoriaMetrics (or any store taking it) on a timer, for anything Prometheus cannot scrape; lifecycle metrics make a hung run loop a one-term alert
CLI sgnmon run, sgnmon check (plugin-friendly exit codes), sgnmon demo

See the user guide: Attaching to Pipelines, Health Checks, The Monitoring Server, Metrics Reference.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sgnmon-0.3.0.tar.gz (142.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sgnmon-0.3.0-py3-none-any.whl (110.4 kB view details)

Uploaded Python 3

File details

Details for the file sgnmon-0.3.0.tar.gz.

File metadata

  • Download URL: sgnmon-0.3.0.tar.gz
  • Upload date:
  • Size: 142.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Hatch/1.16.5 cpython/3.13.12 HTTPX/0.28.1

File hashes

Hashes for sgnmon-0.3.0.tar.gz
Algorithm Hash digest
SHA256 b8d5235737a7219e1c06742595b96bb4b7e7d3b08db4235434d002ba20607188
MD5 c94aea5e404d0ae59560701bd085aa3c
BLAKE2b-256 e4b0d66fb246c9c8b8c60569ab0f88b5fd76ec885f26a5224873555d123ffaa3

See more details on using hashes here.

File details

Details for the file sgnmon-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: sgnmon-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 110.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Hatch/1.16.5 cpython/3.13.12 HTTPX/0.28.1

File hashes

Hashes for sgnmon-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fe87fe3c85cd1ad2b5075efba2e4cf9c205f8e86e73a4f2e1903110ebbacb175
MD5 79c97c7911671e5de56667e3b09d5c1f
BLAKE2b-256 bab81ec947dbed19b31c8267646089c2e064735dd4b06f93d5a7c4dc50c2262a

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 files

0.2.1

2 files

0.2.0

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page