Counter

Class in @sentio/sdk

Defined in @sentio/sdk

Extends

  • Metric

Properties

PropertyTypeInherited from
configMetricConfigMetric.config
namestringMetric.name

Methods

add()

add(
   ctx: BaseContext, 
   value: Numberish, 
   labels?: Labels
): void;

Parameters

ParameterType
ctxBaseContext
valueNumberish
labelsLabels

Returns

void


sub()

sub(
   ctx: BaseContext, 
   value: Numberish, 
   labels?: Labels
): void;

Parameters

ParameterType
ctxBaseContext
valueNumberish
labelsLabels

Returns

void


_create()

static _create(name: string, option?: CounterOptions): Counter;

internal use only, to create a metric use register instead

Parameters

ParameterType
namestring
option?CounterOptions

Returns

Counter


register()

static register(name: string, option?: CounterOptions): Counter;

Parameters

ParameterType
namestring
option?CounterOptions

Returns

Counter

On this page