UNPKG

alepha

Version:

Alepha is a convention-driven TypeScript framework for building robust, end-to-end type-safe applications, from serverless APIs to full-stack React apps.

35 lines (34 loc) 1.38 kB
import * as _alepha_core1 from "alepha"; import { Alepha } from "alepha"; import * as _alepha_server0 from "alepha/server"; import { Histogram, Registry } from "prom-client"; //#region src/providers/ServerMetricsProvider.d.ts declare class ServerMetricsProvider { protected readonly register: Registry; protected readonly alepha: Alepha; protected httpRequestDuration?: Histogram<string>; readonly options: ServerMetricsProviderOptions; readonly metrics: _alepha_server0.RouteDescriptor<_alepha_server0.RequestConfigSchema>; protected readonly onStart: _alepha_core1.HookDescriptor<"start">; protected readonly onRequest: _alepha_core1.HookDescriptor<"server:onRequest">; protected readonly onResponse: _alepha_core1.HookDescriptor<"server:onResponse">; } interface ServerMetricsProviderOptions { prefix?: string; gcDurationBuckets?: number[]; eventLoopMonitoringPrecision?: number; labels?: object; } //#endregion //#region src/index.d.ts /** * This module provides prometheus metrics for the Alepha server. * Metrics are exposed at the `/metrics` endpoint. * * @see {@link ServerMetricsProvider} * @module alepha.server.metrics */ declare const AlephaServerMetrics: _alepha_core1.Service<_alepha_core1.Module<{}>>; //#endregion export { AlephaServerMetrics, ServerMetricsProvider, ServerMetricsProviderOptions }; //# sourceMappingURL=index.d.ts.map