Counter
Class: Counter<T>
Defined in: node_modules/.pnpm/prom-client@15.1.3/node_modules/prom-client/index.d.ts:254
A counter is a cumulative metric that represents a single numerical value that only ever goes up
Type Parameters
T
T extends string = string
Constructors
Constructor
new Counter<
T>(configuration):Counter<T>
Defined in: node_modules/.pnpm/prom-client@15.1.3/node_modules/prom-client/index.d.ts:258
Parameters
configuration
CounterConfiguration<T>
Configuration when creating a Counter metric. Name and Help is required.
Returns
Counter<T>
Methods
get()
get():
Promise<MetricObjectWithValues<MetricValue<T>>>
Defined in: node_modules/.pnpm/prom-client@15.1.3/node_modules/prom-client/index.d.ts:282
Get counter metric object
Returns
Promise<MetricObjectWithValues<MetricValue<T>>>
inc()
Call Signature
inc(
labels,value?):void
Defined in: node_modules/.pnpm/prom-client@15.1.3/node_modules/prom-client/index.d.ts:265
Increment for given labels
Parameters
labels
LabelValues<T>
Object with label keys and values
value?
number
The number to increment with
Returns
void
Call Signature
inc(
value?):void
Defined in: node_modules/.pnpm/prom-client@15.1.3/node_modules/prom-client/index.d.ts:271
Increment with value
Parameters
value?
number
The value to increment with
Returns
void
Call Signature
inc(
incData):void
Defined in: node_modules/.pnpm/prom-client@15.1.3/node_modules/prom-client/index.d.ts:277
Increment with exemplars
Parameters
incData
IncreaseDataWithExemplar<T>
Object with labels, value and exemplars for an increase
Returns
void
labels()
Call Signature
labels(...
values):Internal
Defined in: node_modules/.pnpm/prom-client@15.1.3/node_modules/prom-client/index.d.ts:289
Return the child for given labels
Parameters
values
...string[]
Label values
Returns
Configured counter with given labels
Call Signature
labels(
labels):Internal
Defined in: node_modules/.pnpm/prom-client@15.1.3/node_modules/prom-client/index.d.ts:296
Return the child for given labels
Parameters
labels
LabelValues<T>
Object with label keys and values
Returns
Configured counter with given labels
remove()
Call Signature
remove(...
values):void
Defined in: node_modules/.pnpm/prom-client@15.1.3/node_modules/prom-client/index.d.ts:307
Remove metrics for the given label values
Parameters
values
...string[]
Label values
Returns
void
Call Signature
remove(
labels):void
Defined in: node_modules/.pnpm/prom-client@15.1.3/node_modules/prom-client/index.d.ts:313
Remove metrics for the given label values
Parameters
labels
LabelValues<T>
Object with label keys and values
Returns
void
reset()
reset():
void
Defined in: node_modules/.pnpm/prom-client@15.1.3/node_modules/prom-client/index.d.ts:301
Reset counter values
Returns
void