UNPKG

1.05 kBTypeScriptView Raw
1import { Meter, MeterOptions } from '../metrics/Meter';
2import { MeterProvider } from '../metrics/MeterProvider';
3/**
4 * Singleton object which represents the entry point to the OpenTelemetry Metrics API
5 */
6export declare class MetricsAPI {
7 private static _instance?;
8 /** Empty private constructor prevents end users from constructing a new instance of the API */
9 private constructor();
10 /** Get the singleton instance of the Metrics API */
11 static getInstance(): MetricsAPI;
12 /**
13 * Set the current global meter provider.
14 * Returns true if the meter provider was successfully registered, else false.
15 */
16 setGlobalMeterProvider(provider: MeterProvider): boolean;
17 /**
18 * Returns the global meter provider.
19 */
20 getMeterProvider(): MeterProvider;
21 /**
22 * Returns a meter from the global meter provider.
23 */
24 getMeter(name: string, version?: string, options?: MeterOptions): Meter;
25 /** Remove the global meter provider */
26 disable(): void;
27}
28//# sourceMappingURL=metrics.d.ts.map
\No newline at end of file