@terascope/types / terafoundation / PromMetrics
Interface: PromMetrics
Properties
addCounter()
addCounter: (
name
,help
,labelNames
,collectFn
?) =>Promise
<void
>
Parameters
Parameter | Type |
---|---|
name | string |
help | string |
labelNames | string [] |
collectFn ? | CollectFunction <Counter <string >> |
Returns
Promise
<void
>
Source
addGauge()
addGauge: (
name
,help
,labelNames
,collectFn
?) =>Promise
<void
>
Parameters
Parameter | Type |
---|---|
name | string |
help | string |
labelNames | string [] |
collectFn ? | CollectFunction <Gauge <string >> |
Returns
Promise
<void
>
Source
addHistogram()
addHistogram: (
name
,help
,labelNames
,collectFn
?,buckets
?) =>Promise
<void
>
Parameters
Parameter | Type |
---|---|
name | string |
help | string |
labelNames | string [] |
collectFn ? | CollectFunction <Histogram <string >> |
buckets ? | number [] |
Returns
Promise
<void
>
Source
addSummary()
addSummary: (
name
,help
,labelNames
,collectFn
?,maxAgeSeconds
?,ageBuckets
?,percentiles
?) =>Promise
<void
>
Parameters
Parameter | Type |
---|---|
name | string |
help | string |
labelNames | string [] |
collectFn ? | CollectFunction <Summary <string >> |
maxAgeSeconds ? | number |
ageBuckets ? | number |
percentiles ? | number [] |
Returns
Promise
<void
>
Source
dec()
dec: (
name
,labelValues
,value
) =>void
Parameters
Parameter | Type |
---|---|
name | string |
labelValues | Record <string , string > |
value | number |
Returns
void
Source
deleteMetric()
deleteMetric: (
name
) =>Promise
<boolean
>
Parameters
Parameter | Type |
---|---|
name | string |
Returns
Promise
<boolean
>
Source
getDefaultLabels()
getDefaultLabels: () =>
Record
<string
,string
>
Returns
Record
<string
, string
>
Source
hasMetric()
hasMetric: (
name
) =>boolean
Parameters
Parameter | Type |
---|---|
name | string |
Returns
boolean
Source
inc()
inc: (
name
,labelValues
,value
) =>void
Parameters
Parameter | Type |
---|---|
name | string |
labelValues | Record <string , string > |
value | number |
Returns
void
Source
init()
init: (
config
) =>Promise
<boolean
>
Parameters
Parameter | Type |
---|---|
config | PromMetricsInitConfig |
Returns
Promise
<boolean
>
Source
observe()
observe: (
name
,labelValues
,value
) =>void
Parameters
Parameter | Type |
---|---|
name | string |
labelValues | Record <string , string > |
value | number |
Returns
void
Source
resetMetrics()
resetMetrics: () =>
void
Returns
void
Source
set()
set: (
name
,labels
,value
) =>void
Parameters
Parameter | Type |
---|---|
name | string |
labels | Record <string , string > |
value | number |
Returns
void
Source
shutdown()
shutdown: () =>
Promise
<void
>
Returns
Promise
<void
>
Source
verifyAPI()
verifyAPI: () =>
boolean
Returns
boolean