Package io.opentelemetry.sdk.logs
Interface ReadWriteLogRecord
public interface ReadWriteLogRecord
A log record that can be read from and written to.
- Since:
- 1.27.0
-
Method Summary
Modifier and TypeMethodDescriptiondefault ReadWriteLogRecordsetAllAttributes(io.opentelemetry.api.common.Attributes attributes) Sets attributes to theReadWriteLogRecord.setAttribute(io.opentelemetry.api.common.AttributeKey<T> key, T value) Sets an attribute on the log record.Return an immutableLogRecordDatainstance representing this log record.
-
Method Details
-
setAttribute
Sets an attribute on the log record. If the log record previously contained a mapping for the key, the old value is replaced by the specified value.Note: the behavior of null values is undefined, and hence strongly discouraged.
-
setAllAttributes
Sets attributes to theReadWriteLogRecord. If theReadWriteLogRecordpreviously contained a mapping for any of the keys, the old values are replaced by the specified values.- Parameters:
attributes- the attributes- Returns:
- this.
- Since:
- 1.31.0
-
toLogRecordData
LogRecordData toLogRecordData()Return an immutableLogRecordDatainstance representing this log record.
-