/**
 * Shared event routing logic for observability handlers (exporters and bridges).
 *
 * Both ObservabilityExporter and ObservabilityBridge implement the same optional
 * signal handlers (onTracingEvent, onLogEvent, onMetricEvent, onScoreEvent,
 * onFeedbackEvent). This module provides a single routing function used by both
 * the ObservabilityBus (for exporters) and BaseObservabilityInstance (for bridges).
 */
import type { IMastraLogger } from '@mastra/core/logger';
import type { ObservabilityEvents, ObservabilityEvent, ObservabilityDropEvent } from '@mastra/core/observability';
/**
 * Any handler that can receive routed observability events.
 * Both ObservabilityExporter and ObservabilityBridge extend
 * ObservabilityEvents, so this matches either.
 */
export type ObservabilityHandler = ObservabilityEvents & {
    name: string;
};
/**
 * Route a single event to the appropriate method on a handler.
 *
 * For tracing events, prefers onTracingEvent when present and falls back
 * to exportTracingEvent. For all other signals, calls the corresponding
 * optional handler method if the handler implements it.
 *
 * Returns the handler promise (if async) so callers can track it for flush().
 * Async rejections are caught to prevent unhandled rejections.
 * Sync throws are caught so one failing handler doesn't break others.
 */
export declare function routeToHandler(handler: ObservabilityHandler, event: ObservabilityEvent, logger: IMastraLogger): void | Promise<void>;
/**
 * Route exporter pipeline drop events to a handler.
 *
 * Drop events are meta-events for alerting and health reporting, so they use a
 * dedicated hook instead of the normal observability signal router.
 */
export declare function routeDropToHandler(handler: ObservabilityHandler, event: ObservabilityDropEvent, logger: IMastraLogger): void | Promise<void>;
//# sourceMappingURL=route-event.d.ts.map