Skip to main content

Class: Trace

Defined in: src/types/logging/trace.types.ts

Extends

Constructors

Constructor

new Trace(data: TraceOptions): Trace;
Defined in: src/types/logging/trace.types.ts

Parameters

data
TraceOptions

Returns

Trace

Overrides

StepWithChildSpans.constructor

Properties

createdAt

createdAt: Date;
Defined in: src/types/logging/step.types.ts

Inherited from

StepWithChildSpans.createdAt

datasetInput?

optional datasetInput: string;
Defined in: src/types/logging/step.types.ts

Inherited from

StepWithChildSpans.datasetInput

datasetMetadata?

optional datasetMetadata: Record<string, string> = {};
Defined in: src/types/logging/step.types.ts

Inherited from

StepWithChildSpans.datasetMetadata

datasetOutput?

optional datasetOutput: string;
Defined in: src/types/logging/step.types.ts

Inherited from

StepWithChildSpans.datasetOutput

externalId?

optional externalId: string;
Defined in: src/types/logging/step.types.ts

Inherited from

StepWithChildSpans.externalId

input

input: string;
Defined in: src/types/logging/trace.types.ts

Overrides

StepWithChildSpans.input

metrics

metrics: Metrics;
Defined in: src/types/logging/step.types.ts

Inherited from

StepWithChildSpans.metrics

name

name: string = "";
Defined in: src/types/logging/step.types.ts

Inherited from

StepWithChildSpans.name

output?

optional output: string;
Defined in: src/types/logging/trace.types.ts

Overrides

StepWithChildSpans.output

redactedInput?

optional redactedInput: string;
Defined in: src/types/logging/trace.types.ts

Overrides

StepWithChildSpans.redactedInput

redactedOutput?

optional redactedOutput: string;
Defined in: src/types/logging/trace.types.ts

Overrides

StepWithChildSpans.redactedOutput

spans

spans: Span[] = [];
Defined in: src/types/logging/span.types.ts

Inherited from

StepWithChildSpans.spans

statusCode?

optional statusCode: number;
Defined in: src/types/logging/step.types.ts

Inherited from

StepWithChildSpans.statusCode

stepNumber?

optional stepNumber: number;
Defined in: src/types/logging/step.types.ts

Inherited from

StepWithChildSpans.stepNumber

tags?

optional tags: string[];
Defined in: src/types/logging/step.types.ts

Inherited from

StepWithChildSpans.tags

type

type: "agent" | "llm" | "retriever" | "tool" | "workflow" | "trace" | "session" = StepType.trace;
Defined in: src/types/logging/trace.types.ts

Overrides

StepWithChildSpans.type

userMetadata

userMetadata: Record<string, string> = {};
Defined in: src/types/logging/step.types.ts

Inherited from

StepWithChildSpans.userMetadata

Methods

addChildSpan()

addChildSpan(...spans: Span[]): void;
Defined in: src/types/logging/span.types.ts

Parameters

spans
Span[]

Returns

void

Inherited from

StepWithChildSpans.addChildSpan

toJSON()

toJSON(): Record<string, any>;
Defined in: src/types/logging/span.types.ts

Returns

Record<string, any>

Inherited from

StepWithChildSpans.toJSON

validateInputOutputSerializable()

validateInputOutputSerializable<T>(val: T): T;
Defined in: src/types/logging/step.types.ts

Type Parameters

T
T = | string | { content: string; role: | "function" | "agent" | "tool" | "user" | "assistant" | "developer" | "system"; tool_call_id?: null | string; tool_calls?: null | object[]; } | string[] | Document | Record<string, string> | Document[] | Record<string, string>[] | object[] | Record<string, string>[]

Parameters

val
T

Returns

T

Inherited from

StepWithChildSpans.validateInputOutputSerializable