import type { OtelSpan, OtelLog, OtelMetric, OtelQueryResult } from '../types';
import type { OtelSystemData, OtelSystemProcess, OtelSystemDisk, OtelSystemTable } from '../hooks';
export interface OtelClientOptions {
    /**
     * Base URL of the OTEL service.
     * Defaults to `configuration.otelRunUrl` from the Datalayer core config
     * (i.e. `https://prod1.datalayer.run`).
     */
    baseUrl?: string;
    /** JWT bearer token or API key for authentication. */
    token: string;
    /** Explicit user UID; optional when token contains user.uid/sub. */
    userUid?: string;
}
export interface FetchTracesOptions {
    serviceName?: string;
    limit?: number;
}
export interface FetchLogsOptions {
    serviceName?: string;
    severity?: string;
    traceId?: string;
    limit?: number;
}
export interface FetchMetricsOptions {
    serviceName?: string;
    metricName?: string;
    limit?: number;
}
export interface FetchMetricTotalOptions {
    serviceName?: string;
    limit?: number;
    fallbackWithoutService?: boolean;
}
/**
 * Typed HTTP client for all OTEL service endpoints.
 *
 * Construct via `createOtelClient()` or `new OtelClient(options)`.
 */
export declare class OtelClient {
    private readonly baseUrl;
    private readonly token;
    private readonly userUid;
    constructor(options: OtelClientOptions);
    /** List recent spans / traces. */
    fetchTraces(options?: FetchTracesOptions): Promise<{
        data: OtelSpan[];
        count: number;
    }>;
    /** Fetch all spans for a single trace by `traceId`. */
    fetchTrace(traceId: string): Promise<{
        data: OtelSpan[];
    }>;
    /** List recent log records. */
    fetchLogs(options?: FetchLogsOptions): Promise<{
        data: OtelLog[];
        count: number;
    }>;
    /** List recent metric data points. */
    fetchMetrics(options?: FetchMetricsOptions): Promise<{
        data: OtelMetric[];
        count: number;
    }>;
    /** Sum all values for one metric name, with optional service filter. */
    fetchMetricTotal(metricName: string, options?: FetchMetricTotalOptions): Promise<number>;
    /** List known service names observed in traces. */
    fetchServices(): Promise<string[]>;
    /** Fetch storage / ingestion statistics. */
    fetchStats(): Promise<Record<string, unknown>>;
    /**
     * Execute an ad-hoc DataFusion SQL query against the OTEL service.
     *
     * Available tables: `spans`, `logs`, `metrics`.
     */
    executeQuery(sql: string): Promise<OtelQueryResult>;
    /**
     * Fetch system statistics (platform_admin only).
     *
     * Returns process memory/CPU, disk usage, and per-table row counts.
     */
    fetchSystem(): Promise<OtelSystemData>;
}
/**
 * Create a new `OtelClient`.
 *
 * The `baseUrl` defaults to `configuration.otelRunUrl` from the Datalayer core
 * configuration store, so only pass it when you want to override the default.
 *
 * @example
 * ```ts
 * const client = createOtelClient({ token: jwt });
 * const services = await client.fetchServices();
 * ```
 */
export declare function createOtelClient(options: OtelClientOptions): OtelClient;
export type { OtelSystemData, OtelSystemProcess, OtelSystemDisk, OtelSystemTable, };
