UNPKG

sfcoe-ailabs

Version:

AI-powered code review tool with static analysis integration for comprehensive code quality assessment.

99 lines (98 loc) 3.42 kB
import type { DatadogMetricsConfig } from '../../utils/index.js'; /** * Datadog metrics client for sending custom metrics */ export declare class DatadogMetrics { private static metricsClient; private static config; /** * Initialize the Datadog metrics client with configuration * * @param config - The Datadog metrics configuration object * @returns The initialized metrics client instance */ static initialize(config: DatadogMetricsConfig): any; /** * Get the configured metrics client instance * * @returns The metrics client instance * @throws Error if metrics client is not initialized */ static getInstance(): any; /** * Check if metrics client is initialized * * @returns True if the metrics client is initialized, false otherwise */ static isInitialized(): boolean; /** * Get current configuration * * @returns The current Datadog metrics configuration or null if not set */ static getConfig(): DatadogMetricsConfig | null; /** * Send a counter metric * * @param metric - The metric name to increment * @param value - The value to increment by (default: 1) * @param tags - Array of tags to attach to the metric */ static increment(metric: string, value?: number, tags?: string[]): void; /** * Send a decrement metric * * @param metric - The metric name to decrement * @param value - The value to decrement by (default: 1) * @param tags - Array of tags to attach to the metric */ static decrement(metric: string, value?: number, tags?: string[]): void; /** * Send a gauge metric * * @param metric - The metric name to set a gauge value for * @param value - The gauge value to set * @param tags - Array of tags to attach to the metric */ static gauge(metric: string, value: number, tags?: string[]): void; /** * Send a histogram metric * * @param metric - The metric name to send histogram data for * @param value - The histogram value to record * @param tags - Array of tags to attach to the metric */ static histogram(metric: string, value: number, tags?: string[]): void; /** * Send a timing metric (histogram with time unit) * * @param metric - The metric name to send timing data for * @param value - The timing value in milliseconds * @param tags - Array of tags to attach to the metric */ static timing(metric: string, value: number, tags?: string[]): void; /** * Send a distribution metric * * @param metric - The metric name to send distribution data for * @param value - The distribution value to record * @param tags - Array of tags to attach to the metric */ static distribution(metric: string, value: number, tags?: string[]): void; /** * Send a set metric - not directly supported, use gauge instead * * @param metric - The metric name to set a value for * @param value - The value to set (string or number) * @param tags - Array of tags to attach to the metric */ static set(metric: string, value: string | number, tags?: string[]): void; /** * Flush buffered metrics immediately */ static flush(): void; /** * Close the metrics client */ static close(): void; }