MetricKeyType overview
Added in v2.0.0
Table of contents
- constructors
- modelz
- refinements
- symbols
- CounterKeyTypeTypeId
- CounterKeyTypeTypeId (type alias)
- FrequencyKeyTypeTypeId
- FrequencyKeyTypeTypeId (type alias)
- GaugeKeyTypeTypeId
- GaugeKeyTypeTypeId (type alias)
- HistogramKeyTypeTypeId
- HistogramKeyTypeTypeId (type alias)
- MetricKeyTypeTypeId
- MetricKeyTypeTypeId (type alias)
- SummaryKeyTypeTypeId
- SummaryKeyTypeTypeId (type alias)
- utils
constructors
counter
Signature
export declare const counter: <A extends number | bigint>() => MetricKeyType.Counter<A>
Added in v2.0.0
frequency
Signature
export declare const frequency: (
options?: { readonly preregisteredWords?: ReadonlyArray<string> | undefined } | undefined
) => MetricKeyType.Frequency
Added in v2.0.0
gauge
Signature
export declare const gauge: <A extends number | bigint>() => MetricKeyType.Gauge<A>
Added in v2.0.0
histogram
Signature
export declare const histogram: (boundaries: MetricBoundaries.MetricBoundaries) => MetricKeyType.Histogram
Added in v2.0.0
summary
Signature
export declare const summary: (options: {
readonly maxAge: Duration.DurationInput
readonly maxSize: number
readonly error: number
readonly quantiles: ReadonlyArray<number>
}) => MetricKeyType.Summary
Added in v2.0.0
modelz
MetricKeyType (interface)
Signature
export interface MetricKeyType<in In, out Out> extends MetricKeyType.Variance<In, Out>, Equal.Equal, Pipeable {}
Added in v2.0.0
refinements
isCounterKey
Signature
export declare const isCounterKey: (u: unknown) => u is MetricKeyType.Counter<number | bigint>
Added in v2.0.0
isFrequencyKey
Signature
export declare const isFrequencyKey: (u: unknown) => u is MetricKeyType.Frequency
Added in v2.0.0
isGaugeKey
Signature
export declare const isGaugeKey: (u: unknown) => u is MetricKeyType.Gauge<number | bigint>
Added in v2.0.0
isHistogramKey
Signature
export declare const isHistogramKey: (u: unknown) => u is MetricKeyType.Histogram
Added in v2.0.0
isMetricKeyType
Signature
export declare const isMetricKeyType: (u: unknown) => u is MetricKeyType<unknown, unknown>
Added in v2.0.0
isSummaryKey
Signature
export declare const isSummaryKey: (u: unknown) => u is MetricKeyType.Summary
Added in v2.0.0
symbols
CounterKeyTypeTypeId
Signature
export declare const CounterKeyTypeTypeId: typeof CounterKeyTypeTypeId
Added in v2.0.0
CounterKeyTypeTypeId (type alias)
Signature
export type CounterKeyTypeTypeId = typeof CounterKeyTypeTypeId
Added in v2.0.0
FrequencyKeyTypeTypeId
Signature
export declare const FrequencyKeyTypeTypeId: typeof FrequencyKeyTypeTypeId
Added in v2.0.0
FrequencyKeyTypeTypeId (type alias)
Signature
export type FrequencyKeyTypeTypeId = typeof FrequencyKeyTypeTypeId
Added in v2.0.0
GaugeKeyTypeTypeId
Signature
export declare const GaugeKeyTypeTypeId: typeof GaugeKeyTypeTypeId
Added in v2.0.0
GaugeKeyTypeTypeId (type alias)
Signature
export type GaugeKeyTypeTypeId = typeof GaugeKeyTypeTypeId
Added in v2.0.0
HistogramKeyTypeTypeId
Signature
export declare const HistogramKeyTypeTypeId: typeof HistogramKeyTypeTypeId
Added in v2.0.0
HistogramKeyTypeTypeId (type alias)
Signature
export type HistogramKeyTypeTypeId = typeof HistogramKeyTypeTypeId
Added in v2.0.0
MetricKeyTypeTypeId
Signature
export declare const MetricKeyTypeTypeId: typeof MetricKeyTypeTypeId
Added in v2.0.0
MetricKeyTypeTypeId (type alias)
Signature
export type MetricKeyTypeTypeId = typeof MetricKeyTypeTypeId
Added in v2.0.0
SummaryKeyTypeTypeId
Signature
export declare const SummaryKeyTypeTypeId: typeof SummaryKeyTypeTypeId
Added in v2.0.0
SummaryKeyTypeTypeId (type alias)
Signature
export type SummaryKeyTypeTypeId = typeof SummaryKeyTypeTypeId
Added in v2.0.0
utils
MetricKeyType (namespace)
Added in v2.0.0
Variance (interface)
Signature
export interface Variance<in In, out Out> {
readonly [MetricKeyTypeTypeId]: {
readonly _In: Types.Contravariant<In>
readonly _Out: Types.Covariant<Out>
}
}
Added in v2.0.0
Counter (type alias)
Signature
export type Counter<A extends number | bigint> = MetricKeyType<A, MetricState.MetricState.Counter<A>> & {
readonly [CounterKeyTypeTypeId]: CounterKeyTypeTypeId
readonly incremental: boolean
readonly bigint: boolean
}
Added in v2.0.0
Frequency (type alias)
Signature
export type Frequency = MetricKeyType<string, MetricState.MetricState.Frequency> & {
readonly [FrequencyKeyTypeTypeId]: FrequencyKeyTypeTypeId
readonly preregisteredWords: ReadonlyArray<string>
}
Added in v2.0.0
Gauge (type alias)
Signature
export type Gauge<A extends number | bigint> = MetricKeyType<A, MetricState.MetricState.Gauge<A>> & {
readonly [GaugeKeyTypeTypeId]: GaugeKeyTypeTypeId
readonly bigint: boolean
}
Added in v2.0.0
Histogram (type alias)
Signature
export type Histogram = MetricKeyType<number, MetricState.MetricState.Histogram> & {
readonly [HistogramKeyTypeTypeId]: HistogramKeyTypeTypeId
readonly boundaries: MetricBoundaries.MetricBoundaries
}
Added in v2.0.0
InType (type alias)
Signature
export type InType<Type extends MetricKeyType<any, any>> = [Type] extends [
{
readonly [MetricKeyTypeTypeId]: {
readonly _In: (_: infer In) => void
}
}
]
? In
: never
Added in v2.0.0
OutType (type alias)
Signature
export type OutType<Type extends MetricKeyType<any, any>> = [Type] extends [
{
readonly [MetricKeyTypeTypeId]: {
readonly _Out: (_: never) => infer Out
}
}
]
? Out
: never
Added in v2.0.0
Summary (type alias)
Signature
export type Summary = MetricKeyType<readonly [number, number], MetricState.MetricState.Summary> & {
readonly [SummaryKeyTypeTypeId]: SummaryKeyTypeTypeId
readonly maxAge: Duration.Duration
readonly maxSize: number
readonly error: number
readonly quantiles: ReadonlyArray<number>
}
Added in v2.0.0
Untyped (type alias)
Signature
export type Untyped = MetricKeyType<any, any>
Added in v2.0.0