Skip to main content

@terascope/types / terafoundation / PromMetrics

Interface: PromMetrics

Properties

addCounter()

addCounter: (name, help, labelNames, collectFn?) => Promise<void>

Parameters

ParameterType
namestring
helpstring
labelNamesstring[]
collectFn?CollectFunction<Counter<string>>

Returns

Promise<void>

Source

terafoundation.ts:200


addGauge()

addGauge: (name, help, labelNames, collectFn?) => Promise<void>

Parameters

ParameterType
namestring
helpstring
labelNamesstring[]
collectFn?CollectFunction<Gauge<string>>

Returns

Promise<void>

Source

terafoundation.ts:198


addHistogram()

addHistogram: (name, help, labelNames, collectFn?, buckets?) => Promise<void>

Parameters

ParameterType
namestring
helpstring
labelNamesstring[]
collectFn?CollectFunction<Histogram<string>>
buckets?number[]

Returns

Promise<void>

Source

terafoundation.ts:202


addSummary()

addSummary: (name, help, labelNames, collectFn?, maxAgeSeconds?, ageBuckets?, percentiles?) => Promise<void>

Parameters

ParameterType
namestring
helpstring
labelNamesstring[]
collectFn?CollectFunction<Summary<string>>
maxAgeSeconds?number
ageBuckets?number
percentiles?number[]

Returns

Promise<void>

Source

terafoundation.ts:204


dec()

dec: (name, labelValues, value) => void

Parameters

ParameterType
namestring
labelValuesRecord<string, string>
valuenumber

Returns

void

Source

terafoundation.ts:196


deleteMetric()

deleteMetric: (name) => Promise<boolean>

Parameters

ParameterType
namestring

Returns

Promise<boolean>

Source

terafoundation.ts:208


getDefaultLabels()

getDefaultLabels: () => Record<string, string>

Returns

Record<string, string>

Source

terafoundation.ts:212


hasMetric()

hasMetric: (name) => boolean

Parameters

ParameterType
namestring

Returns

boolean

Source

terafoundation.ts:207


inc()

inc: (name, labelValues, value) => void

Parameters

ParameterType
namestring
labelValuesRecord<string, string>
valuenumber

Returns

void

Source

terafoundation.ts:195


init()

init: (config) => Promise<boolean>

Parameters

ParameterType
configPromMetricsInitConfig

Returns

Promise<boolean>

Source

terafoundation.ts:193


observe()

observe: (name, labelValues, value) => void

Parameters

ParameterType
namestring
labelValuesRecord<string, string>
valuenumber

Returns

void

Source

terafoundation.ts:197


resetMetrics()

resetMetrics: () => void

Returns

void

Source

terafoundation.ts:210


set()

set: (name, labels, value) => void

Parameters

ParameterType
namestring
labelsRecord<string, string>
valuenumber

Returns

void

Source

terafoundation.ts:194


shutdown()

shutdown: () => Promise<void>

Returns

Promise<void>

Source

terafoundation.ts:211


verifyAPI()

verifyAPI: () => boolean

Returns

boolean

Source

terafoundation.ts:209