import type { Span } from '@opentelemetry/api';
/** @internal Mutable attributes collected while tracing an OAuth operation. */
export type OAuthTelemetryState = {
    result?: string;
    responseStatus?: number;
    callbackInvoked?: boolean;
    failureCode?: string;
    errorType?: string;
};
/** @internal Traces one OAuth lifecycle operation and records its metrics. */
export declare function traceOAuthOperation<T>(spanName: string, connectionName: string, operation: string, execute: (span: Span, telemetry: OAuthTelemetryState) => Promise<T>): Promise<T>;
/** @internal Adds an unexpected exception to the current OAuth span. */
export declare function recordUnexpectedOAuthError(span: Span, telemetry: OAuthTelemetryState, error: unknown, errorType: string): void;
