export interface TracedAsOptions { recordParams?: boolean; recordResult?: boolean; recordError?: boolean; } /** * @TracedAs(name, options) decorator factory. * * Usage: * @TracedAs("server.home.render", { recordParams: false, recordResult: false }) * private async sendIndex(res: http.ServerResponse): Promise { ... } * * If the spans.db is unreachable (no host, no env, schema mismatch), * the decorator becomes a transparent passthrough — the wrapped * function is called with its original `this` and arguments. */ export declare function TracedAs(name: string, _options?: TracedAsOptions): any>(_target: any, propertyKey: string, descriptor: TypedPropertyDescriptor) => TypedPropertyDescriptor; /** * For tests: reset the module-level db cache so test fixtures * can simulate a fresh host install. Not used in production. */ export declare function __resetTracedAsCacheForTests(): void; /** * For tests: returns the resolved spans.db path or null. Allows * tests to assert the decorator located the host DB. */ export declare function __getResolvedSpansDbPathForTests(): string | null; /** * Ensure the parent dir of a candidate spans.db path exists * (used by tests that point at a temp file). Best-effort. */ export declare function __ensureSpansDbDirForTests(path: string): void; /** * `withTrace(name, fn)` — manual instrumentation helper for free * functions (which TS decorators cannot decorate). Runs `fn` and * records a span around the invocation. Mirrors the @TracedAs * contract: never throws, no-ops when spans.db is unavailable. * * Used by `renderSessionForestPage` and `encodeMermaidLabelText` * (top-level exports that cannot carry a class-method decorator). */ export declare function withTrace(name: string, fn: () => Promise | T): Promise; /** * Synchronous variant of `withTrace`. Used for top-level * non-async exports. */ export declare function withTraceSync(name: string, fn: () => T): T; //# sourceMappingURL=decorator.d.ts.map