metricslog

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2026 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Package metricslog is the Prometheus observer on the lifecycle spine. It owns no metrics of its own — it reads the per-request lifecycle Context + outcome in the post-flight phase and forwards them to the one-liner emitters in pkg/metrics. Registering it is the entire wiring for the request-flow metrics (Q1–Q3 in docs/metrics.md); no runner (pipeline/proxy/ws/batch) changes, because every runner already feeds the lifecycle spine.

Out of scope: the data-loss and provider-key-health metrics (Q3/Q4) are emitted at their sources (the emitters, keypool) — they don't pass through here.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Hook

type Hook struct{}

Hook reads request outcome + timing and emits the request-flow metrics. It is a pure lifecycle.Hook: it produces no stored result (returns nil) and never mutates the Context. Emitting a Prometheus sample is a cheap, non-blocking atomic op, so it satisfies the "Fill must be cheap" rule.

func New

func New() *Hook

New constructs the (stateless) metrics observer.

func (*Hook) Fill

func (*Hook) Name

func (*Hook) Name() string

Jump to

Keyboard shortcuts

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