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
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default ReadWriteLogRecord
setAllAttributes(Attributes attributes)
Sets attributes to theReadWriteLogRecord
.<T> ReadWriteLogRecord
setAttribute(AttributeKey<T> key, T value)
Sets an attribute on the log record.LogRecordData
toLogRecordData()
Return an immutableLogRecordData
instance representing this log record.
-
-
-
Method Detail
-
setAttribute
<T> ReadWriteLogRecord setAttribute(AttributeKey<T> key, T value)
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
default ReadWriteLogRecord setAllAttributes(Attributes attributes)
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.
-
-