import type { TracingEvent, InitExporterOptions, MetricEvent, LogEvent, ScoreEvent, FeedbackEvent } from '@mastra/core/observability';
import type { TracingStorageStrategy } from '@mastra/core/storage';
import type { BaseExporterConfig } from './base.js';
import { BaseExporter } from './base.js';
/**
 * Configuration for the DefaultExporter's batching, retry, and strategy behavior.
 *
 * @deprecated Use `MastraStorageExporterConfig` from `@mastra/observability` instead.
 * This interface is kept for backward compatibility and will be removed in a
 * future major version.
 */
interface DefaultExporterConfig extends BaseExporterConfig {
    maxBatchSize?: number;
    maxBufferSize?: number;
    maxBatchWaitMs?: number;
    maxRetries?: number;
    retryDelayMs?: number;
    strategy?: TracingStorageStrategy | 'auto';
}
/**
 * @deprecated Use `MastraStorageExporter` from `@mastra/observability` instead.
 * This class is preserved unchanged so existing integrations (including code
 * that matches on the `mastra-default-observability-exporter` exporter name)
 * keep working. It will be removed in a future major version.
 *
 * Default storage-backed exporter. Buffers observability events and flushes them
 * in batches to the configured ObservabilityStorage backend with retry support.
 */
export declare class DefaultExporter extends BaseExporter {
    #private;
    name: string;
    constructor(config?: DefaultExporterConfig);
    /**
     * Initialize the exporter (called after all dependencies are ready)
     */
    init(options: InitExporterOptions): Promise<void>;
    /**
     * Checks if buffer should be flushed based on size or time triggers
     */
    private shouldFlush;
    /**
     * Schedules a flush using setTimeout
     */
    private scheduleFlush;
    /**
     * Checks flush triggers and schedules/triggers flush as needed.
     * Called after adding any event to the buffer.
     * Returns the flush promise when flushing so callers can await it.
     */
    private handleBatchedFlush;
    private sanitizeDropError;
    private emitDrop;
    /**
     * Flush a batch of create events for a single signal type.
     * On "not implemented" errors, disables the signal for future flushes.
     * On other errors, re-adds events to the buffer for retry.
     */
    private flushCreates;
    /**
     * Flush span update/end events, deferring any whose span hasn't been created yet.
     * When `isEnd` is true, successfully flushed spans are removed from tracking.
     */
    private flushSpanUpdates;
    /**
     * Flushes the current buffer to storage.
     *
     * Creates are flushed first, then their span keys are added to allCreatedSpans.
     * Updates are checked against allCreatedSpans — those whose span hasn't been
     * created yet are re-inserted into the live buffer for the next flush.
     * Completed spans (SPAN_ENDED) are cleaned up from allCreatedSpans after success.
     */
    private flushBuffer;
    _exportTracingEvent(event: TracingEvent): Promise<void>;
    /**
     * Resolves when an ongoing init call is finished
     * Doesn't wait for the caller to call init
     * @returns
     */
    private waitForInit;
    /**
     * Handle metric events — buffer for batch flush.
     */
    onMetricEvent(event: MetricEvent): Promise<void>;
    /**
     * Handle log events — buffer for batch flush.
     */
    onLogEvent(event: LogEvent): Promise<void>;
    /**
     * Handle score events — buffer for batch flush.
     */
    onScoreEvent(event: ScoreEvent): Promise<void>;
    /**
     * Handle feedback events — buffer for batch flush.
     */
    onFeedbackEvent(event: FeedbackEvent): Promise<void>;
    /**
     * Force flush any buffered spans without shutting down the exporter.
     * This is useful in serverless environments where you need to ensure spans
     * are exported before the runtime instance is terminated.
     */
    flush(): Promise<void>;
    shutdown(): Promise<void>;
}
export {};
//# sourceMappingURL=default.d.ts.map