Skip to content

Documentation / @agentick/kernel / Counter

Interface: Counter ​

Defined in: kernel/src/telemetry.ts:50

A counter metric that only increases (e.g., request count, error count).

Example ​

typescript
const requestCounter = Telemetry.getCounter('requests', 'count', 'Total requests');
requestCounter.add(1, { endpoint: '/api/chat' });

Methods ​

add() ​

add(value, attributes?): void

Defined in: kernel/src/telemetry.ts:52

Add a value to the counter.

Parameters ​

value ​

number

attributes? ​

MetricAttributes

Returns ​

void

Released under the ISC License.