import type { ExporterHealthStatus, ExporterStatus, ExportResult, LangfuseExporterConfig, SpanData } from "../../types/index.js";
import { BaseExporter } from "./baseExporter.js";
/**
 * @description Exporter that delivers observation spans to Langfuse's OTLP/HTTP JSON endpoint (`POST /api/public/otel/v1/traces`), which keeps native observation types and identity on every observation. Spans are queued without blocking and sent in batches, with at most `MAX_CONCURRENT_DELIVERIES` requests in flight; spans that end while every one is busy wait, at most `MAX_QUEUED_SPANS` of them, and the oldest beyond that are dropped, counted and warned about once a minute. Failed requests are retried with backoff when the failure is transient (429, 5xx, network), after the `Retry-After` of a 429 or 503 when it names one (at most `MAX_EXPORT_RETRY_AFTER_MS`). `flush()` and `shutdown()` wait at most `flushBudgetMs` and then drop what is still in flight, and a batch that could not be delivered is reported by `exportBatch`, logged at warn level and counted in the health check; when Langfuse took none of the latest batch (refused, failed or every span rejected), `getStatus()` and `healthCheck()` read unhealthy with the dropped count until a batch is accepted again. `exportSpan` reports only the buffer step, so a failed delivery never opens the registry's circuit breaker and spans that end after an outage are still buffered and sent.
 */
export declare class LangfuseExporter extends BaseExporter {
    private readonly langfuse;
    private readonly authorization;
    private readonly baseUrl;
    private readonly policy;
    private readonly flushBudgetMs;
    private readonly inflight;
    private delivery;
    private droppedSpans;
    private acceptedSpans;
    private lastDeliveryError;
    private unwarnedQueueDrops;
    private lastQueueDropWarning;
    private unwarnedRefusals;
    private lastRefusalWarning;
    private credentialsRejected;
    /**
     * @description Creates an exporter for one Langfuse project.
     * @param config {LangfuseExporterConfig} - Credentials, endpoint, environment, release, masking, batching and flush-budget options. `environment` and `release` fall back to `LANGFUSE_TRACING_ENVIRONMENT` and `LANGFUSE_RELEASE`, and only fill spans that do not carry them already.
     */
    constructor(langfuse: LangfuseExporterConfig);
    initialize(): Promise<void>;
    exportSpan(span: SpanData): Promise<ExportResult>;
    exportBatch(spans: SpanData[]): Promise<ExportResult>;
    /**
     * @description Sends everything buffered and waits for delivery, but no longer than the flush budget; spans still in flight when it runs out are dropped and counted, and spans still waiting for a delivery slot stay buffered.
     * @returns {Promise<void>} Resolves when delivery finished or the budget ran out.
     */
    flush(): Promise<void>;
    protected bufferSpan(span: SpanData): void;
    private dispatch;
    private dropOldestWaiting;
    private settle;
    private nextDelivery;
    private exportQuietly;
    /**
     * @description Delivers what is buffered, including spans that end while it drains, within the flush budget, then stops the exporter. Spans that could not be sent by then are dropped and counted, so none is left pending.
     * @returns {Promise<void>} Resolves when the exporter has stopped.
     */
    shutdown(): Promise<void>;
    /**
     * @description Snapshot of this exporter for status reporting, without a network call: what is queued, what Langfuse accepted and what was dropped, and unhealthy while the latest delivery failed.
     * @returns {ExporterStatus} The exporter's current state.
     */
    getStatus(): ExporterStatus;
    healthCheck(): Promise<ExporterHealthStatus>;
    protected ping(): Promise<void>;
    private reportRefusals;
    private record;
    private deliver;
    private post;
}
