@vtex/diagnostics-nodejs
Version:
Diagnostics library for Node.js applications
16 lines • 794 B
TypeScript
import { Context, Meter, UpDownCounter } from '@opentelemetry/api';
import { MetricsOption } from './options';
import { Gauge as GaugeInterface } from '../types/metrics';
export declare class Gauge implements GaugeInterface {
private gauge;
private lastValues;
constructor(gauge: UpDownCounter);
add(value: number, attributes?: Record<string, unknown>, context?: Context): void;
subtract(value: number, attributes?: Record<string, unknown>, context?: Context): void;
set(value: number, attributes?: Record<string, unknown>, context?: Context): void;
private updateLastValue;
private getAttributesKey;
private convertAttributes;
}
export declare function NewGauge(meter: Meter, name: string, opts?: MetricsOption[]): Gauge;
//# sourceMappingURL=gauge.d.ts.map