Skip to main content

light-telemetry

UDP fire-and-forget telemetry client for LightTelemetry — a lightweight observability daemon for test environments and embedded/bare-metal hardware where OpenTelemetry is too heavy.

Features

  • Fire-and-forget — emit serializes one packet and sends one UDP datagram. No buffering, no retries: telemetry never blocks or crashes your application.
  • Degradation-aware — a background watcher tracks reverse heartbeats from the server; when they stop, emissions drop before serialization (zero cost when the collector is gone).
  • Two wire formats — JSON (default) or MessagePack.
  • Auto-discovery — adopt the server's telemetry.toml to find the ingest endpoint and heartbeat timing automatically.
  • logging integration — TelemetryLogHandler forwards logging records as telemetry events.
  • MTU-safe — oversized packets are truncated to a marker, never fragmented.

Install

pip install light-telemetry
# or
uv add light-telemetry

Requires Python ≥ 3.11.

Quickstart

Zero-config localhost client

Reads telemetry.toml (/etc/telemetry.toml, then ~/.config/telemetry.toml) written by the server — target address and heartbeat timing come from the daemon itself. Falls back to 127.0.0.1:9876 if no file exists.

from light_telemetry import TelemetryClient

client = TelemetryClient.local("my-app", "service")
client.start()  # spawns the heartbeat watcher
client.emit("test.start", {"case": "can_tx", "rig": 3})
client.stop()

Explicit endpoint

from light_telemetry import TelemetryClient

with TelemetryClient(
    ("192.168.1.10", 9876),
    host_id="bench-01",
    host_class="rig",
    use_msgpack=True,           # MessagePack wire format
    heartbeat_timeout=3.0,      # s; None disables the watcher
) as client:
    client.emit("firmware.flash", {"target": "stm32", "bytes": 65536})

logging integration

import logging
from light_telemetry import TelemetryClient, TelemetryLogHandler

client = TelemetryClient.local("my-app", "service").start()
logging.getLogger().addHandler(TelemetryLogHandler(client, topic="logger"))

log = logging.getLogger("sut")
log.info("device under test ready", extra={"fw": "1.4.2"})
# every record emits: {"level", "logger", "message", + extra fields}

Server

Events land in the light-telemetry daemon, which exposes REST queries, a wait-subscription API, a WebSocket stream, and a Grafana-compatible JSON adapter. Storage backends: in-memory, SQLite, PostgreSQL.

License

MIT OR Apache-2.0

Metadata

Release files for light-telemetry 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for light-telemetry 0.1.1
File Size Uploaded Provenance Actions
light_telemetry-0.1.1.tar.gz 57.2 kB Without provenance Details for light_telemetry-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for light-telemetry 0.1.1
File Interpreter ABI Platform Actions
light_telemetry-0.1.1-py3-none-any.whl Python 3 none any Details for light_telemetry-0.1.1-py3-none-any.whl

Total release size: 65.1 kB

Release files / light_telemetry-0.1.1.tar.gz

Download URL light_telemetry-0.1.1.tar.gz
Size 57.2 kB
Tags Source
SHA-256 checksum
How to use checksums
3a2f1b40eb766b5be6854cc430d0b5359a4a06fcc1353aa4f32dc1a400c6a1f9
BLAKE2b-256 checksum
How to use checksums
e1db32a38c6962c276dafc73c1f75bfe8c29b2a4b4aff7fc8c6627472f671ada
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.21 {"installer":{"name":"uv","version":"0.12.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / light_telemetry-0.1.1-py3-none-any.whl

Download URL light_telemetry-0.1.1-py3-none-any.whl
Size 7.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
840cb4053ec09d57c65914fa5d6ac33971e46c074521d7581265d85803656fd2
BLAKE2b-256 checksum
How to use checksums
43e116e8f279ca62d303c4b1b138625bddf1e42cd0491c81908f9addebd2bbcf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.21 {"installer":{"name":"uv","version":"0.12.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for light-telemetry 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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