Class: abstract EvaluatableBaseContainer
Defined in: src/lib/logger/components/base.ts:240
Extended base container that supports evaluation functionality.
Provides additional capabilities for containers that can be evaluated,
such as sessions, traces, generations, and retrievals. Includes methods
for triggering evaluations.
EvaluatableBaseContainer
Extends
Extended by
Constructors
Constructor
new EvaluatableBaseContainer(Defined in: src/lib/logger/components/base.ts:48 Creates a new base container instance.entity,config,writer):EvaluatableBaseContainer
Parameters
entity
Entity
The entity type this container represents
config
BaseConfig
Configuration for the container
writer
LogWriter
Log writer instance for committing changes
Returns
EvaluatableBaseContainer
Throws
When the provided ID contains invalid characters (only alphanumeric, hyphens, and underscores allowed; only throws if you haveraiseExceptions config set to true)
Inherited from
BaseContainer.constructor
Accessors
evaluate
Get Signature
get evaluate(): EvaluateContainer
Defined in: src/lib/logger/components/base.ts:248
Gets the evaluation methods for this container.
Example
Returns
EvaluateContainer
Evaluation methods for configuring and triggering evaluations
id
Get Signature
get id(): string
Defined in: src/lib/logger/components/base.ts:80
Gets the unique identifier for this container.
Returns
string
The container’s unique ID
Inherited from
BaseContainer.id
Methods
addMetadata()
addMetadata(Defined in: src/lib/logger/components/base.ts:124 Adds metadata to this container for additional context and debugging. Any data type could be added as the value in the metadata record.metadata):void
Parameters
metadata
Record<string, unknown>
Key-value pairs of metadata
Returns
void
void
Example
Inherited from
BaseContainer.addMetadata
addTag()
addTag(Defined in: src/lib/logger/components/base.ts:94 Adds a tag to this container for categorization and filtering.key,value):void
Parameters
key
string
The tag key
value
string
The tag value
Returns
void
void
Example
Inherited from
BaseContainer.addTag
data()
data(): any
Defined in: src/lib/logger/components/base.ts:191
Returns the current data state of this container.
Returns
any
The container’s data.
Inherited from
BaseContainer.data
end()
end(): void
Defined in: src/lib/logger/components/base.ts:163
Marks this container as ended and records the end timestamp.
Returns
void
void
Example
Inherited from
BaseContainer.end
addMetadata_()
Defined in: src/lib/logger/components/base.ts:144 Static method to add metadata to any container by ID.staticaddMetadata_(writer,entity,id,metadata):void
Parameters
writer
LogWriter
The log writer instance
entity
Entity
The entity type
id
string
The container ID
metadata
Record<string, unknown>
The metadata to add
Returns
void
void
Inherited from
BaseContainer.addMetadata_
addTag_()
Defined in: src/lib/logger/components/base.ts:108 Static method to add a tag to any container by ID.staticaddTag_(writer,entity,id,key,value):void
Parameters
writer
LogWriter
The log writer instance
entity
Entity
The entity type
id
string
The container ID
key
string
The tag key
value
string
The tag value
Returns
void
void
Inherited from
BaseContainer.addTag_
end_()
Defined in: src/lib/logger/components/base.ts:177 Static method to end any container by ID.staticend_(writer,entity,id,data?):void
Parameters
writer
LogWriter
The log writer instance
entity
Entity
The entity type
id
string
The container ID
data?
any
Optional additional data to include with the end event
Returns
void
void
Inherited from
BaseContainer.end_
evaluate_()
Defined in: src/lib/logger/components/base.ts:260 Static method to get evaluation methods for any evaluatable container by ID.staticevaluate_(writer,entity,id):EvaluateContainer
Parameters
writer
LogWriter
The log writer instance
entity
Entity
The entity type
id
string
The container ID
Returns
EvaluateContainer
Evaluation methods for configuring and triggering evaluations