GenAIMainAgentLogRecordProcessor class

Copies any microsoft.gen_ai.main_agent.* attributes from the current span onto every emitted log record.

Methods

forceFlush()

Flushes pending work. No-op for this processor.

onEmit(SdkLogRecord, Context)

Copies any microsoft.gen_ai.main_agent.* attributes from the active span onto the emitted log record.

shutdown()

Shuts down the processor. No-op for this processor.

Method Details

forceFlush()

Flushes pending work. No-op for this processor.

function forceFlush(): Promise<void>

Returns

Promise<void>

onEmit(SdkLogRecord, Context)

Copies any microsoft.gen_ai.main_agent.* attributes from the active span onto the emitted log record.

function onEmit(logRecord: SdkLogRecord, contextArg?: Context)

Parameters

logRecord

SdkLogRecord

The log record being emitted.

contextArg

Context

Optional context used to resolve the current span.

shutdown()

Shuts down the processor. No-op for this processor.

function shutdown(): Promise<void>

Returns

Promise<void>