import { type Context, type Logger } from "@steve.kite/stdlib"; import { type Attributes, type Tracer as OpenTelemetryTracer } from "@opentelemetry/api"; export type ContextWork = (ctx: Context) => Result | PromiseLike; /** Adds OpenTelemetry attributes to the stdlib span currently carried by a context. */ export declare function setSpanAttributes(ctx: Context, attributes: Attributes): void; /** Returns the OpenTelemetry trace ID for the span currently carried by a context. */ export declare function spanTraceId(ctx: Context): string | undefined; export declare function withRequestContext(route: string, logContext: Readonly>, work: ContextWork): Promise>; /** Runs an intentionally untraced streaming request without creating a named lifetime context. */ export declare function withUntracedRequestContext(route: string, logContext: Readonly>, work: ContextWork): Promise>; export declare function withWorkerContext(worker: string, work: ContextWork, logContext?: Readonly>): Promise>; export declare function withConnectionContext(connection: string, work: ContextWork, logContext?: Readonly>): Promise>; export declare function withProcessContext(processName: string, work: ContextWork, logContext?: Readonly>): Promise>; export declare function withTerminalContext(terminal: string, work: ContextWork, logContext?: Readonly>): Promise>; /** Installs logging and tracing on the private application root. */ export declare function initializeDaemonContext(logger: Logger, tracer?: OpenTelemetryTracer): void;