Skip to content

Trace

new Trace(options, processor?): Trace;
Parameter Type

options

TraceOptions

processor?

TracingProcessor

Trace

groupId: string | null;

optional metadata: Record<string, any>;

name: string;

traceId: string;

optional tracingApiKey: string;

type: "trace";
clone(): Trace;

Trace


end(): Promise<void>;

Promise<void>


start(): Promise<void>;

Promise<void>


toJSON(options?): object | null;

Serializes the trace for export or persistence. Set includeTracingApiKey to true only when you intentionally need to persist the exporter credentials (for example, when handing off a run to another process that cannot access the original environment). Defaults to false to avoid leaking secrets.

Parameter Type

options?

{ includeTracingApiKey?: boolean; }

options.includeTracingApiKey?

boolean

object | null