import { Tracer as OtelTracer, Context as OtelContext, Span as OtelSpan, Meter as OtelMeter, MetricOptions as OtelMetricOptions } from '@opentelemetry/api';
import { AttributeValue, Attributes, Meter, Counter, Histogram, Gauge } from './interfaces';
import { ContextManager, Telemetry, Tracer, Span, Time, Exception } from 'bullmq';
declare class BullMQOTelContextManager implements ContextManager<OtelContext> {
    private contextAPI;
    getMetadata(ctx: OtelContext): string;
    fromMetadata(activeCtx: OtelContext, metadata: string): OtelContext;
    with<A extends (...args: any[]) => any>(ctx: OtelContext, fn: A): ReturnType<A>;
    active(): OtelContext;
}
declare class BullMQOtelTracer implements Tracer {
    private tracer;
    constructor(tracer: OtelTracer);
    startSpan(name: string, options?: any, context?: OtelContext): Span<OtelContext>;
}
export declare class BullMQOTelSpan implements Span<OtelContext> {
    span: OtelSpan;
    constructor(span: OtelSpan);
    setSpanOnContext(ctx: OtelContext): OtelContext;
    setAttribute(key: string, value: AttributeValue): void;
    setAttributes(attributes: Attributes): void;
    addEvent(name: string, attributes?: Attributes, time?: Time): void;
    recordException(exception: Exception, time?: Time): void;
    end(): void;
}
declare class BullMQOTelMeter implements Meter {
    private meter;
    private counters;
    private histograms;
    private gauges;
    constructor(meter: OtelMeter);
    createCounter(name: string, options?: OtelMetricOptions): Counter;
    createHistogram(name: string, options?: OtelMetricOptions): Histogram;
    createGauge(name: string, options?: OtelMetricOptions): Gauge;
}
/**
 * Configuration options for BullMQOtel telemetry
 */
export interface BullMQOtelOptions {
    /**
     * Name for the tracer (default: 'bullmq')
     */
    tracerName?: string;
    /**
     * Name for the meter (default: 'bullmq')
     */
    meterName?: string;
    /**
     * Version string for both tracer and meter
     */
    version?: string;
    /**
     * Enable metrics collection. When true, a meter will be created
     * to record job metrics like completed/failed counts and durations.
     * @default false
     */
    enableMetrics?: boolean;
}
export declare class BullMQOtel implements Telemetry<OtelContext> {
    tracer: BullMQOtelTracer;
    contextManager: BullMQOTelContextManager;
    meter?: BullMQOTelMeter;
    /**
     * Creates a new BullMQOtel telemetry instance.
     *
     * @param tracerNameOrOptions - Either a tracer name string (for backward compatibility)
     *                              or a configuration options object
     * @param version - Version string (only used when first parameter is a string)
     *
     * @example
     * // Simple usage (backward compatible)
     * const telemetry = new BullMQOtel('my-app', '1.0.0');
     *
     * @example
     * // With metrics enabled
     * const telemetry = new BullMQOtel({
     *   tracerName: 'my-app',
     *   meterName: 'my-app',
     *   version: '1.0.0',
     *   enableMetrics: true,
     * });
     */
    constructor(tracerNameOrOptions?: string | BullMQOtelOptions, version?: string);
}
export {};
