metrics

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package metrics owns the Prometheus instrumentation: the metric definitions and the /metrics exposition handler. Layers record observations through the functions here; nothing in this package depends on the rest of the system, so any layer may import it (the composition root wires GC observations in, keeping gc itself instrumentation-free).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handler

func Handler() http.Handler

Handler serves the Prometheus exposition endpoint (GET /metrics).

func ObserveGCSweep

func ObserveGCSweep(purged, orphans, expiredKeys int, err error)

ObserveGCSweep records the outcome of one reconciliation sweep.

func ObserveRequest

func ObserveRequest(method, pattern string, status int, elapsed time.Duration)

ObserveRequest records one served HTTP request. pattern must be the matched route pattern, never the raw URL — path parameters like file ids would blow up label cardinality.

Types

This section is empty.

Jump to

Keyboard shortcuts

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