Package io.opentelemetry.sdk.logs
Class SdkReadWriteLogRecord
- java.lang.Object
-
- io.opentelemetry.sdk.logs.SdkReadWriteLogRecord
-
- All Implemented Interfaces:
ReadWriteLogRecord
@ThreadSafe class SdkReadWriteLogRecord extends java.lang.Object implements ReadWriteLogRecord
-
-
Field Summary
Fields Modifier and Type Field Description private AttributesMap
attributes
private Value<?>
body
private InstrumentationScopeInfo
instrumentationScopeInfo
private java.lang.Object
lock
private LogLimits
logLimits
private long
observedTimestampEpochNanos
private Resource
resource
private Severity
severity
private java.lang.String
severityText
private SpanContext
spanContext
private long
timestampEpochNanos
-
Constructor Summary
Constructors Modifier Constructor Description private
SdkReadWriteLogRecord(LogLimits logLimits, Resource resource, InstrumentationScopeInfo instrumentationScopeInfo, long timestampEpochNanos, long observedTimestampEpochNanos, SpanContext spanContext, Severity severity, java.lang.String severityText, Value<?> body, AttributesMap attributes)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) static SdkReadWriteLogRecord
create(LogLimits logLimits, Resource resource, InstrumentationScopeInfo instrumentationScopeInfo, long timestampEpochNanos, long observedTimestampEpochNanos, SpanContext spanContext, Severity severity, java.lang.String severityText, Value<?> body, AttributesMap attributes)
Create the log record with the given configuration.private Attributes
getImmutableAttributes()
<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.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.opentelemetry.sdk.logs.ReadWriteLogRecord
setAllAttributes
-
-
-
-
Field Detail
-
logLimits
private final LogLimits logLimits
-
resource
private final Resource resource
-
instrumentationScopeInfo
private final InstrumentationScopeInfo instrumentationScopeInfo
-
timestampEpochNanos
private final long timestampEpochNanos
-
observedTimestampEpochNanos
private final long observedTimestampEpochNanos
-
spanContext
private final SpanContext spanContext
-
severity
private final Severity severity
-
severityText
@Nullable private final java.lang.String severityText
-
body
@Nullable private final Value<?> body
-
lock
private final java.lang.Object lock
-
attributes
@Nullable private AttributesMap attributes
-
-
Constructor Detail
-
SdkReadWriteLogRecord
private SdkReadWriteLogRecord(LogLimits logLimits, Resource resource, InstrumentationScopeInfo instrumentationScopeInfo, long timestampEpochNanos, long observedTimestampEpochNanos, SpanContext spanContext, Severity severity, @Nullable java.lang.String severityText, @Nullable Value<?> body, @Nullable AttributesMap attributes)
-
-
Method Detail
-
create
static SdkReadWriteLogRecord create(LogLimits logLimits, Resource resource, InstrumentationScopeInfo instrumentationScopeInfo, long timestampEpochNanos, long observedTimestampEpochNanos, SpanContext spanContext, Severity severity, @Nullable java.lang.String severityText, @Nullable Value<?> body, @Nullable AttributesMap attributes)
Create the log record with the given configuration.
-
setAttribute
public <T> ReadWriteLogRecord setAttribute(AttributeKey<T> key, T value)
Description copied from interface:ReadWriteLogRecord
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.
- Specified by:
setAttribute
in interfaceReadWriteLogRecord
-
getImmutableAttributes
private Attributes getImmutableAttributes()
-
toLogRecordData
public LogRecordData toLogRecordData()
Description copied from interface:ReadWriteLogRecord
Return an immutableLogRecordData
instance representing this log record.- Specified by:
toLogRecordData
in interfaceReadWriteLogRecord
-
-