MetricHook
Constructors
Signature
declare const counter: <A extends number | bigint>(key: MetricKey.MetricKey.Counter<A>) => MetricHook.Counter<A>Signature
declare const frequency: (_key: MetricKey.MetricKey.Frequency) => MetricHook.FrequencySignature
declare const gauge: { (key: Gauge<number>, startAt: number): Gauge<number>; (key: Gauge<bigint>, startAt: bigint): Gauge<bigint>;}Signature
declare const histogram: (key: MetricKey.MetricKey.Histogram) => MetricHook.HistogramSignature
declare const make: <In, Out>(options: { readonly get: LazyArg<Out>; readonly modify: (input: In) => void; readonly update: (input: In) => void;}) => MetricHook<In, Out>Signature
declare const summary: (key: MetricKey.MetricKey.Summary) => MetricHook.SummaryModels
MetricHook interface
Added in v2.0.0
Source
Signature
interface MetricHook<in In, out Out> extends Variance<In, Out>, Pipeable { get(): Out; modify(input: In): void; update(input: In): void;}Other
MetricHook
Added in v2.0.0
Source
Symbols
MetricHookTypeId
Added in v2.0.0
Source
Signature
declare const MetricHookTypeId: unique symbolMetricHookTypeId type
Added in v2.0.0
Source
Signature
type MetricHookTypeId = typeof MetricHookTypeIdUtils
Signature
declare const onModify: { <In, Out>(f: (input: In) => void): (self: MetricHook<In, Out>) => MetricHook<In, Out>; <In, Out>(self: MetricHook<In, Out>, f: (input: In) => void): MetricHook<In, Out>;}Signature
declare const onUpdate: { <In, Out>(f: (input: In) => void): (self: MetricHook<In, Out>) => MetricHook<In, Out>; <In, Out>(self: MetricHook<In, Out>, f: (input: In) => void): MetricHook<In, Out>;}