import type { Manifold } from '../../core/pipework.js'; import type { TraceContext, TraceEntryKind } from './trace-context.js'; /** * The parent reference openTrace actually consumes. Two shapes satisfy it: * an in-process `TraceContext` (the active trace on the surrounding Flow) and * a synthesized `{ id, rootId }` derived from an ingested W3C `traceparent` * header. Either way, only the two fields are needed to wire the trace tree. */ export interface ParentTraceRef { readonly id: string; readonly rootId: string; } export interface OpenTraceParams { readonly instance: Manifold; readonly entryKind: TraceEntryKind; /** The parent trace, or `null` for a root entry. */ readonly parent: ParentTraceRef | null; readonly tenant: string | null; /** The entry's auth principal — `userId` is read off it when present. */ readonly auth: unknown; readonly requestId: string | null; readonly sessionId: string | null; } /** Generates a trace id, wires it into the tree, and kicks off the opening `INSERT`. */ export declare function openTrace(params: OpenTraceParams): TraceContext; //# sourceMappingURL=open-trace.d.ts.map