Extends
SpanBase
Accessors
model
Get Signature
get model(): string
Defined in: src/genai/subagent.ts:78
Returns
string
name
Get Signature
get name(): string
Defined in: src/genai/subagent.ts:74
Returns
string
Methods
addEvent()
addEvent(Add a named event to the span. Useful for marking non-span moments such as context compaction, tool-loop detection, or guardrail trips. Warns and no-ops aftername,attributes?,startTime?):this
end(). Mirrors OTel Span.addEvent.
Defined in: src/genai/spanBase.ts:82
Parameters
name
string
attributes?
Attributes
startTime?
TimeInput
Returns
this
Example
Inherited from
SpanBase.addEvent
end()
end(Read current field values (to reflect mutations made viaopts?):void
record()
since start) and close the span. Idempotent. Pass error to mark
it as failed; pass endTime to backdate the close.
Defined in: src/genai/subagent.ts:153
Parameters
opts?
SpanEndOptions
Returns
void
record()
record(Bulk-set any fields. Replaces (does not merge). Defined in: src/genai/subagent.ts:117opts):this
Parameters
opts
agentDescription?
string
agentId?
string
agentVersion?
string
model?
string
name?
string
systemInstructions?
string[]
Returns
this
setAttributes()
setAttributes(Set multiple attributes on the span at once. Warns and no-ops afterattributes):this
end(). Mirrors OTel Span.setAttributes (and the Python SDK’s
set_attributes).
Defined in: src/genai/spanBase.ts:63
Parameters
attributes
Attributes
Returns
this
Example
Inherited from
SpanBase.setAttributes