OpenTelemetry SDK
    Preparing search index...

    Interface LogRecordProcessor

    interface LogRecordProcessor {
        enabled?(
            options: {
                context: Context;
                eventName?: string;
                instrumentationScope: core.InstrumentationScope;
                severityNumber?: SeverityNumber;
            },
        ): boolean;
        forceFlush(): Promise<void>;
        onEmit(logRecord: SdkLogRecord, context?: Context): void;
        shutdown(): Promise<void>;
    }

    Implemented by

    Index

    Methods

    • Forces to export all finished log records

      Returns Promise<void>

    • Called when a LogRecord is emit

      Parameters

      • logRecord: SdkLogRecord

        the ReadWriteLogRecord that just emitted.

      • Optionalcontext: Context

        the current Context, or an empty Context if the Logger was obtained with include_trace_context=false

      Returns void

    • Shuts down the processor. Called when SDK is shut down. This is an opportunity for processor to do any cleanup required.

      Returns Promise<void>