Documentation
¶
Overview ¶
Package dbmetrics defines the data-access-wide repository-operation- duration instrument (used by store.go/resolver.go): a metric name plus a thin re-export of pkg/telemetry/db's generic OperationRecorder.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Init ¶
func Init(reg prometheus.Registerer) error
Init registers the duration histogram with reg. Call once, from the API boot path (dataaccess.NewDataAccessAPI), before serving traffic.
func Observe ¶
Observe runs fn, recording its duration under operation (e.g. "store.BatchUpsert") and a status of "ok" or "error" based on whether fn returned an error.
func ObserveErr ¶
ObserveErr is Observe for operations that return only an error.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.