This describes replacing the conventional statsd_exporter UDP listener with a kernel-side packet probe and a userspace decoder so StatsD datagrams sent to 127.0.0.1:8125 are counted even when no process has bound the port. An eBPF tcx program attached to ingress/egress on every interface inspects L4 headers, filters source or destination ports from a tiny hash map, copies a bounded payload into a ring buffer, and emits a wire_event struct (ts, sport, dport, ifindex, dir, total_len, captured, data). The probe is ~165 lines of C and exposes maps and BTF-typed events to a yeet daemon. A JavaScript decoder running in a yeet isolate reads events via the ring buffer, splits Latin-1 lines, parses StatsD types (c, g, ms, h, s), applies sample rates and tag-to-label conversion, and lazily creates Prometheus families in a telemetry registry without prewritten YAML mappings.
The scrape path is a SharedWorker plus a tiny scrape script: render() pulls the worker registry, reshapes families, and the yeet service streams the console output as an HTTP response so Prometheus scrapes http://host:9100/statsd_exporter/metrics normally. The result: apps keep fire-and-forget UDP, no per-language exporter process or socket binding is required, and metrics appear even when no listener exists. Trade-offs are explicit: visibility is host-sent datagrams (you see what the host sends rather than what a remote listener would receive) and a couple operational differences versus a traditional listener. Source code is available at yeet-src/statsd-exporter.
Summary generated by AI from the linked article. hn.today is not affiliated with Hacker News or Y Combinator.