Documentation
¶
Overview ¶
Package metricsadapter implements bridge.MetricsCollector over a go-utils metrics registry, such as a Forge app's.
You only need it if you embed the engine and want the bridge signals (hook-bus events and the operational counters IncrementCounter carries) in a registry. In a Forge app the extension passes the app's registry to authsome.WithMetricsSink instead, which records authsome's own metric families and needs no adapter.
Every family this adapter writes keeps the same label keys on every series, and none is labelled by tenant: the tenant the engine passes is an app ID, which is unbounded.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Adapter ¶
type Adapter struct {
// contains filtered or unexported fields
}
Adapter implements bridge.MetricsCollector over a metrics registry.
func New ¶
New returns an adapter recording into m. A nil registry yields a nil adapter, which callers treat as "no metrics".
func (*Adapter) IncrementCounter ¶
IncrementCounter implements bridge.MetricsCollector: IncrementCounter("auth.lockout", ...) adds one to authsome_auth_lockout_total. The tenant is ignored.
func (*Adapter) IncrementGauge ¶
IncrementGauge implements bridge.MetricsCollector. The tenant is ignored.
func (*Adapter) RecordEvent ¶
RecordEvent implements bridge.MetricsCollector: authsome_events_total by action, resource and outcome and, when a duration is given, a histogram of it in seconds under the same labels. The tenant is ignored.