F-03: Observability slog + Prometheus (bookshelf-qqz.3) #3
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "bd-bookshelf-qqz.3"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Adds
internal/observability(F-03 of the Foundation epic bookshelf-qqz):NewLogger(w io.Writer, format, level string) (*slog.Logger, error)— json|text handler, levels debug/info/warn/error (case-insensitive, "warning" alias, empty defaults to info). Errors on unknown values.NewRegistry() *prometheus.Registry— a fresh registry (NOT the default — avoids ginkgo cross-test pollution) with Go runtime + process collectors pre-registered.MetricsHandler(reg) http.Handler—promhttp.HandlerForwrapping the registry.NewTraceID() string— 10 bytes fromcrypto/randencoded as 16-char base32 (no padding). Panics on RNG failure (unrecoverable).Takes simple primitives, not config types — main.go wiring lives in a later bead.
Test plan
go vet ./internal/observability/...passesgo test -race ./internal/observability/...passesinternal/observabilityCloses bead bookshelf-qqz.3 on merge.
16e9d932efto4dd228deaezombor referenced this pull request2026-07-22 01:34:53 +00:00
zombor referenced this pull request2026-07-22 17:34:01 +00:00
zombor referenced this pull request2026-07-23 01:00:37 +00:00
zombor referenced this pull request2026-07-23 02:24:47 +00:00
zombor referenced this pull request2026-07-24 00:07:35 +00:00
zombor referenced this pull request2026-07-25 00:30:33 +00:00
zombor referenced this pull request2026-07-25 00:32:49 +00:00
zombor referenced this pull request2026-07-25 00:49:34 +00:00
zombor referenced this pull request2026-08-08 02:33:00 +00:00