import { NoopSpanProcessor, type ReadableSpan, type SpanProcessor } from "@opentelemetry/sdk-trace-base";
import { type Configuration } from "../shared/config.js";
export declare const TRANSACTION_NAME_ATTRIBUTE = "sw.transaction";
/**
 * Sets a custom name for the current transaction
 *
 * @param name - Custom transaction name
 * @returns Whether the name was successfully set
 */
export declare function setTransactionName(name: string): boolean;
/** Processor that sets the transaction name attribute on spans */
export declare class TransactionNameProcessor extends NoopSpanProcessor implements SpanProcessor {
    #private;
    constructor(config: Configuration);
    onEnd(span: ReadableSpan): void;
}
/** Computes a transaction name from a span and its attributes */
export declare function computedTransactionName(span: ReadableSpan): string;
/**
 * A pool that prevents explosion of cardinality in transaction names
 *
 * The pool only allows a certain amount of transaction names to exist
 * at any given moment. If it is full, it will replace any name not
 * already in the pool with a default one. The pool frees up space
 * by pruning names that haven't been used in a given amount of time.
 */
export declare class TransactionNamePool {
    #private;
    constructor(options: {
        max: number;
        ttl: number;
        maxLength: number;
        default: string;
    });
    /** Given a desired transaction name return the one that should be used */
    registered(name: string): string;
}
//# sourceMappingURL=transaction-name.d.ts.map