OpenTelemetry SDK
    Preparing search index...

    A recording of an event. Typically, the record includes a timestamp indicating when the event happened as well as other data that describes what happened, where it happened, etc.

    This interface is not intended to be implemented by users. To produce logs, use Logger#emit. To consume logs, implement LogRecordProcessor#onEmit. SdkLogRecord instances are created and managed by the SDK.

    interface SdkLogRecord {
        attributes: AnyValueMap;
        body?: AnyValue;
        droppedAttributesCount: number;
        eventName?: string;
        hrTime: HrTime;
        hrTimeObserved: HrTime;
        instrumentationScope: core.InstrumentationScope;
        resource: resources.Resource;
        severityNumber?: SeverityNumber;
        severityText?: string;
        spanContext?: SpanContext;
        setAttribute(key: string, value?: AnyValue): SdkLogRecord;
        setAttributes(attributes: AnyValueMap): SdkLogRecord;
        setBody(body: AnyValue): SdkLogRecord;
        setEventName(eventName: string): SdkLogRecord;
        setSeverityNumber(severityNumber: SeverityNumber): SdkLogRecord;
        setSeverityText(severityText: string): SdkLogRecord;
    }
    Index

    Properties

    attributes: AnyValueMap
    body?: AnyValue
    droppedAttributesCount: number
    eventName?: string
    hrTime: HrTime
    hrTimeObserved: HrTime
    instrumentationScope: core.InstrumentationScope

    The instrumentation scope associated with the log record.

    Downstream consumers may group exported records by the identity of this object. If a distinct grouping is required, construct a new scope object instead of reusing an existing one.

    severityNumber?: SeverityNumber
    severityText?: string
    spanContext?: SpanContext

    Methods