metrics

package
v0.19.2 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2026 License: Apache-2.0, Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handler

func Handler() http.Handler

Handler returns a placeholder metrics handler when Prometheus build tag not enabled.

func IncRedaction

func IncRedaction()

IncRedaction discards the redaction event: metrics collection is disabled in this build. See metrics_prom.go's IncRedaction for the counted equivalent.

func IncRequest

func IncRequest(proto, method, host string)

IncRequest discards proto/method/host: metrics collection is disabled in this build. See metrics_prom.go's IncRequest for the counted equivalent.

func LastObservedWALLagMs

func LastObservedWALLagMs() int64

LastObservedWALLagMs returns the last observed WAL lag in ms (test helper).

func ObserveAddedLatencyMs

func ObserveAddedLatencyMs(ms float64)

ObserveAddedLatencyMs discards the observed proxy-added latency: metrics collection is disabled in this build. See metrics_prom.go's ObserveAddedLatencyMs for the histogram-backed equivalent.

func ObserveBodyBytes

func ObserveBodyBytes(n float64)

ObserveBodyBytes discards the observed captured-body size: metrics collection is disabled in this build. See metrics_prom.go's ObserveBodyBytes for the histogram-backed equivalent.

func ObserveDurationMs

func ObserveDurationMs(proto, method, host string, ms float64)

ObserveDurationMs discards the observed request duration: metrics collection is disabled in this build. See metrics_prom.go's ObserveDurationMs for the histogram-backed equivalent.

func ObserveWALLagMs

func ObserveWALLagMs(ms float64)

ObserveWALLagMs records ms as the last observed WAL fsync-lag measurement, retrievable via LastObservedWALLagMs. Unlike the other no-op Observe*/Inc* functions in this build, it does track its argument (in an atomic.Int64) rather than discarding it, since LastObservedWALLagMs is used as a test/diagnostic hook independent of the Prometheus build tag.

func Start

func Start(addr string)

Start is a no-op in the default (non-"prom") build: it does not open a listener on addr or expose any metrics endpoint. See metrics_prom.go's Start for the real Prometheus-backed implementation.

Types

This section is empty.

Jump to

Keyboard shortcuts

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