Skip to main content

Class: StepWithChildSpans

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

Extends

Extended by

Constructors

Constructor

new StepWithChildSpans(type: "agent" | "llm" | "retriever" | "tool" | "workflow" | "trace" | "session", data: StepWithChildSpansOptions): StepWithChildSpans;
Defined in: src/types/logging/span.types.ts

Parameters

type
"agent" | "llm" | "retriever" | "tool" | "workflow" | "trace" | "session"
data
StepWithChildSpansOptions

Returns

StepWithChildSpans

Overrides

BaseSpan.constructor

Properties

createdAt

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

Inherited from

BaseSpan.createdAt

datasetInput?

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

Inherited from

BaseSpan.datasetInput

datasetMetadata?

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

Inherited from

BaseSpan.datasetMetadata

datasetOutput?

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

Inherited from

BaseSpan.datasetOutput

externalId?

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

Inherited from

BaseSpan.externalId

input

input: StepAllowedInputType;
Defined in: src/types/logging/span.types.ts

Inherited from

BaseSpan.input

metrics

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

Inherited from

BaseSpan.metrics

name

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

Inherited from

BaseSpan.name

output?

optional output: StepAllowedOutputType;
Defined in: src/types/logging/step.types.ts

Inherited from

BaseSpan.output

redactedInput?

optional redactedInput: StepAllowedInputType;
Defined in: src/types/logging/span.types.ts

Inherited from

BaseSpan.redactedInput

redactedOutput?

optional redactedOutput: StepAllowedOutputType;
Defined in: src/types/logging/step.types.ts

Inherited from

BaseSpan.redactedOutput

spans

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

statusCode?

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

Inherited from

BaseSpan.statusCode

stepNumber?

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

Inherited from

BaseSpan.stepNumber

tags?

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

Inherited from

BaseSpan.tags

type

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

Inherited from

BaseSpan.type

userMetadata

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

Inherited from

BaseSpan.userMetadata

Methods

addChildSpan()

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

Parameters

spans
Span[]

Returns

void

toJSON()

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

Returns

Record<string, any>

Overrides

BaseSpan.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

BaseSpan.validateInputOutputSerializable