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
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.2.1.tar.gz (117.1 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.2.1-py3-none-any.whl (95.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sgnmon-0.2.1.tar.gz
  • Upload date:
  • Size: 117.1 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.2.1.tar.gz
Algorithm Hash digest
SHA256 99a362189e62cf68dc0711ec127954ff128d18752ff6a62edd4e5e543fbf264f
MD5 ec0dacee249708c5e73a9896182195cb
BLAKE2b-256 0ea1776a82f364a39dad58401613d798b4c90f967c97952ad124359816ad0b3c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sgnmon-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 95.5 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.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 23c5086f29bfd5e676916cad53c6d0b992141fce25e9b198e2371d621a1a06d5
MD5 7c3076ce50b0e5209e3b7fe2d613a905
BLAKE2b-256 1e8d8da488235258fd5005fac4d0407e97c80a159764a7b2998117e78de7d279

See more details on using hashes here.

Release history Release notifications | RSS feed

0.3.0

2 files

This release

0.2.1 This release

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