/**
 * Observability Manager
 * Integrations for Prometheus, OpenTelemetry, and Datadog
 * Sealed namespace for immutability
 */
import type { Tracer } from '@opentelemetry/api';
import type { Registry } from 'prom-client';
export type ObservabilityConfig = {
    prometheus: {
        enabled: boolean;
        port?: number;
        path?: string;
        defaultLabels?: Record<string, string>;
    };
    openTelemetry: {
        enabled: boolean;
        serviceName: string;
        exporterUrl?: string;
        sampleRate?: number;
    };
    datadog: {
        enabled: boolean;
        host?: string;
        port?: number;
        prefix?: string;
        tags?: string[];
    };
};
export type MetricType = 'counter' | 'gauge' | 'histogram' | 'summary';
export type MetricDefinition = {
    name: string;
    type: MetricType;
    help: string;
    labels?: string[];
};
export type TraceContext = {
    traceId: string;
    spanId: string;
    parentSpanId?: string;
    baggage?: Record<string, string>;
};
export type SpanAttributes = Record<string, string | number | boolean>;
type DatadogClient = {
    increment: (name: string, value?: number, tags?: string[]) => void;
    gauge: (name: string, value: number, tags?: string[]) => void;
    histogram: (name: string, value: number, tags?: string[]) => void;
    timing: (name: string, value: number, tags?: string[]) => void;
    close: (callback?: () => void) => void;
};
/**
 * Observability Manager - Sealed namespace
 */
export declare const Observability: Readonly<{
    /**
     * Initialize observability with configuration
     */
    initialize(observabilityConfig: ObservabilityConfig): Promise<void>;
    /**
     * Register a metric
     */
    registerMetric(definition: MetricDefinition): Promise<void>;
    /**
     * Increment a counter
     */
    incrementCounter(name: string, value?: number, labels?: Record<string, string>): void;
    /**
     * Set a gauge value
     */
    setGauge(name: string, value: number, labels?: Record<string, string>): void;
    /**
     * Record a histogram observation
     */
    recordHistogram(name: string, value: number, labels?: Record<string, string>): void;
    /**
     * Record timing (histogram for duration)
     */
    recordTiming(name: string, durationMs: number, labels?: Record<string, string>): void;
    /**
     * Start a span (OpenTelemetry)
     */
    startSpan(name: string, options?: {
        attributes?: SpanAttributes;
        parentSpanId?: string;
    }): string | null;
    /**
     * End a span
     */
    endSpan(spanId: string, attributes?: SpanAttributes): void;
    /**
     * Record an error on a span
     */
    recordSpanError(spanId: string, error: Error): void;
    /**
     * Add event to span
     */
    addSpanEvent(spanId: string, name: string, attributes?: SpanAttributes): void;
    /**
     * Get Prometheus metrics (for HTTP endpoint)
     */
    getPrometheusMetrics(): Promise<string>;
    /**
     * Get Prometheus registry (for advanced usage)
     */
    getPrometheusRegistry(): Registry | null;
    /**
     * Get Datadog client (for advanced usage)
     */
    getDatadogClient(): DatadogClient | null;
    /**
     * Get OpenTelemetry tracer (for advanced usage)
     */
    getTracer(): Tracer | null;
    /**
     * Record worker job metrics
     */
    recordJobMetrics(workerName: string, jobName: string, metrics: {
        processed?: number;
        failed?: number;
        durationMs?: number;
        queueSize?: number;
    }): void;
    /**
     * Record worker resource metrics
     */
    recordResourceMetrics(workerName: string, resources: {
        cpuUsage?: number;
        memoryUsage?: number;
        activeJobs?: number;
    }): void;
    /**
     * Create a traced function wrapper
     */
    traced<T extends (...args: unknown[]) => unknown>(name: string, fn: T, options?: {
        attributes?: SpanAttributes;
    }): T;
    /**
     * Get configuration
     */
    getConfig(): ObservabilityConfig | null;
    /**
     * Check if observability is enabled
     */
    isEnabled(): boolean;
    /**
     * Clear metrics for a specific worker
     */
    clearWorkerMetrics(workerName: string): Promise<void>;
    /**
     * Shutdown
     */
    shutdown(): void;
}>;
export {};
//# sourceMappingURL=Observability.d.ts.map