import type { Context, Span } from "../observability/index.js"; export interface ProxyRequestLifecycle { end(statusCode: number, error?: Error): void; } export interface RunProxyRequestLifecycleOptions { req: Request; url: URL; extractContext(headers: Headers): Context | undefined; startServerSpan(method: string, path: string, parentContext?: Context): { span: Span; context: Context; } | null; withContext(spanContext: Context, fn: () => Promise): Promise; endSpan(span: Span | undefined, statusCode: number, error?: Error): void; handle(lifecycle: ProxyRequestLifecycle): Promise; } /** Run a proxied HTTP request with tracing context and exactly-once span finalization. */ export declare function runProxyRequestLifecycle(options: RunProxyRequestLifecycleOptions): Promise; //# sourceMappingURL=request-lifecycle.d.ts.map