Package io.opentelemetry.sdk.logs
Interface ReadWriteLogRecord
- All Known Implementing Classes:
SdkReadWriteLogRecord
public interface ReadWriteLogRecord
A log record that can be read from and written to.
- Since:
- 1.27.0
-
Method Summary
Modifier and TypeMethodDescriptiondefault ReadWriteLogRecord
setAllAttributes
(Attributes attributes) Sets attributes to theReadWriteLogRecord
.setAttribute
(AttributeKey<T> key, T value) Sets an attribute on the log record.Return an immutableLogRecordData
instance 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 theReadWriteLogRecord
previously 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 immutableLogRecordData
instance representing this log record.
-