stats-observer

command
v0.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 12, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package stats-observer demonstrates how to use stats.ValidationObserver and stats.ReportErrors with codecs directly — without any HTTP or MQTT adapter.

This is the codec-only observability path: implement just stats.ValidationObserver (one method) and call stats.ReportErrors after each codex.Codec.Decode.

Scenario: an application validates its config file on startup. Invalid config fields emit stats.RecordValidationError events that a production observer would route to Prometheus counters, structured logs, or alerting.

Run with: go run ./examples/stats-observer

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL