UNPKG

@devopsplaybook.io/otel-utils

Version:

Utility to simplify integration with Open Telemetry

13 lines (12 loc) 551 B
import { Counter, Histogram, ObservableGauge } from "@opentelemetry/api"; import { ConfigOTelInterface } from "./models/ConfigOTelInterface"; export declare class StandardMeter { private meter; private serviceVersion; private serviceName; constructor(config: ConfigOTelInterface); createCounter(key: string): Counter; createUpDownCounter(key: string): Counter; createHistogram(key: string): Histogram; createObservableGauge(key: string, callback: (observableResult: any) => void, description?: any): ObservableGauge; }