A recording of a 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;
}

Properties

attributes: AnyValueMap
body?: AnyValue
droppedAttributesCount: number
eventName?: string
hrTime: HrTime
hrTimeObserved: HrTime
instrumentationScope: core.InstrumentationScope
severityNumber?: SeverityNumber
severityText?: string
spanContext?: SpanContext

Methods