/**
 * OTLP HTTP span exporter with fail-safe queue and retry.
 *
 * All exports are non-blocking — spans are enqueued immediately and
 * exported asynchronously. Export failures are logged but never thrown.
 * The runtime is never blocked by OTLP connectivity issues.
 *
 * Compatible with the OTLP/HTTP JSON format for traces (v1/traces).
 */
import type { ReadableSpan, SpanExporter } from '../types.js';
import type { OtlpConfig } from './types.js';
/**
 * Non-blocking OTLP/HTTP span exporter.
 *
 * Spans are batched and exported via an internal fail-safe queue.
 * The exporter never throws — failures are logged and retried per
 * the configured retry policy.
 *
 * @example
 * ```ts
 * const exporter = new OtlpExporter({
 *   endpoint: 'http://localhost:4318/v1/traces',
 *   batchSize: 256,
 *   timeoutMs: 8000,
 *   headers: { 'x-api-key': 'my-token' },
 * });
 * ```
 */
export declare class OtlpExporter implements SpanExporter {
    readonly name = "otlp";
    private readonly _config;
    private readonly _queue;
    private readonly _pending;
    constructor(config: OtlpConfig);
    /**
     * Accept completed spans.
     *
     * Spans are accumulated into the pending buffer. When the buffer
     * reaches `batchSize`, a batch is enqueued for async export.
     * Remaining spans are flushed on `flush()` or `shutdown()`.
     *
     * Never throws.
     */
    export(spans: ReadableSpan[]): Promise<void>;
    /**
     * Flush any pending (unbatched) spans and wait for queue to drain.
     * Never throws.
     */
    flush(): Promise<void>;
    /**
     * Flush remaining spans and shut down the export queue.
     * Best-effort — waits up to drainTimeoutMs.
     * Never throws.
     */
    shutdown(): Promise<void>;
    /**
     * Performs the actual HTTP POST to the OTLP endpoint.
     * Called exclusively by the ExportQueue — must not throw.
     */
    private _httpExport;
    /**
     * Result callback — logs failures without throwing.
     */
    private _onExportResult;
}
//# sourceMappingURL=otlp.d.ts.map