@gati-framework/runtime
Version:
Gati runtime execution engine for running handler-based applications
30 lines • 1.18 kB
TypeScript
/**
* @module runtime/observability-factory
* @description Factory for creating observability providers
*/
import type { IMetricsProvider } from '@gati-framework/contracts';
import type { MetricsClient } from './metrics-client.js';
export interface ObservabilityConfig {
metrics?: {
provider?: IMetricsProvider;
};
}
/**
* Adapter that wraps IMetricsProvider to implement MetricsClient interface
*/
export declare class MetricsClientAdapter implements MetricsClient {
private provider;
constructor(provider: IMetricsProvider);
incrementCounter(name: string, labels?: Record<string, string>, value?: number): void;
setGauge(name: string, value: number, labels?: Record<string, string>): void;
recordHistogram(name: string, value: number, labels?: Record<string, string>): void;
createSpan(): any;
withSpan<T>(name: string, fn: (span: any) => Promise<T>): Promise<T>;
logWithContext(): void;
recordAudit(): void;
}
/**
* Create metrics client from configuration
*/
export declare function createMetricsClient(config?: ObservabilityConfig): MetricsClient | undefined;
//# sourceMappingURL=observability-factory.d.ts.map