/**
 * MetricsContextImpl - User-facing metric emission API.
 *
 * All metrics are validated, cardinality-filtered, and constructed here
 * before being routed through ObservabilityBus.emit().
 * CorrelationContext and metadata are snapshotted at construction time.
 */
import type { MetricsContext, Counter, Gauge, Histogram, CorrelationContext, MetricEmitOptions } from '@mastra/core/observability';
import type { ObservabilityBus } from '../bus/index.js';
import type { CardinalityFilter } from '../metrics/cardinality.js';
/** Configuration for creating a MetricsContextImpl. */
export interface MetricsContextConfig {
    /** Top-level trace identity for emitted metric events */
    traceId?: string;
    /** Top-level span identity for emitted metric events */
    spanId?: string;
    /** Canonical correlation context derived from the current span */
    correlationContext?: CorrelationContext;
    /** Non-canonical metadata to attach to emitted metric events */
    metadata?: Record<string, unknown>;
    /** Cardinality filter applied to emitted metric labels */
    cardinalityFilter: CardinalityFilter;
    /** Bus for event emission */
    observabilityBus: ObservabilityBus;
}
/**
 * User-facing metric emission API. All metrics are routed through
 * ObservabilityBus.emit() after validation and cardinality filtering.
 */
export declare class MetricsContextImpl implements MetricsContext {
    private traceId?;
    private spanId?;
    private correlationContext?;
    private metadata?;
    private cardinalityFilter;
    private observabilityBus;
    /**
     * Create a metrics context. Correlation context and metadata are defensively
     * copied so mutations after construction do not affect emitted metrics.
     */
    constructor(config: MetricsContextConfig);
    /** Emit a metric observation. */
    emit(name: string, value: number, labels?: Record<string, string>, options?: MetricEmitOptions): void;
    /** @deprecated Use `emit()` instead. */
    counter(name: string): Counter;
    /** @deprecated Use `emit()` instead. */
    gauge(name: string): Gauge;
    /** @deprecated Use `emit()` instead. */
    histogram(name: string): Histogram;
}
//# sourceMappingURL=metrics.d.ts.map