interface DecoratorContext { target: any; propertyKey: string; } /** * 调用栈提取工具 * 用于自动提取HTTP请求的调用服务和方法信息 */ export declare class CallStackExtractor { /** * 按异步调用链存储装饰器上下文栈(用于传递装饰器信息到HTTP客户端) */ private static readonly decoratorContextStorage; private static readonly manualCallInfoStorage; /** * 设置装饰器上下文 */ static setDecoratorContext(context: DecoratorContext): void; /** * 获取当前最内层装饰器上下文 */ static getDecoratorContext(): DecoratorContext | null; /** * 清除装饰器上下文 */ static clearDecoratorContext(): void; /** * 从调用栈中提取服务和方法信息 */ static extractCallInfo(): { serviceClass?: string; methodName?: string; operationName?: string; }; /** * 手动设置调用信息(当自动检测失败时) */ static setCallInfo(serviceClass: string, methodName: string, operationName?: string): void; /** * 获取手动设置的调用信息 */ static getManualCallInfo(): { serviceClass?: string; methodName?: string; operationName?: string; } | null; /** * 清理手动设置的调用信息 */ static clearCallInfo(): void; /** * 获取调用信息(优先使用手动设置的信息) */ static getCallInfo(): { serviceClass?: string; methodName?: string; operationName?: string; }; /** * 从装饰器中提取调用信息 */ static extractFromDecorator(target: any, propertyKey: string): { serviceClass?: string; methodName?: string; operationName?: string; }; /** * 生成操作名称 */ static generateOperationName(serviceClass?: string, methodName?: string, config?: any): string; /** * 格式化服务类名 */ static formatServiceClass(serviceClass?: string): string; /** * 格式化方法名 */ static formatMethodName(methodName?: string): string; /** * 解析调用栈行 */ private static parseStackLine; /** * 判断是否为内部调用 */ private static isInternalCall; } export {};