Package io.opentelemetry.sdk.logs
Class SdkReadWriteLogRecord
java.lang.Object
io.opentelemetry.sdk.logs.SdkReadWriteLogRecord
- All Implemented Interfaces:
ReadWriteLogRecord
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate AttributesMap
private final Value
<?> private final InstrumentationScopeInfo
private final Object
private final LogLimits
private final long
private final Resource
private final Severity
private final String
private final SpanContext
private final long
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
SdkReadWriteLogRecord
(LogLimits logLimits, Resource resource, InstrumentationScopeInfo instrumentationScopeInfo, long timestampEpochNanos, long observedTimestampEpochNanos, SpanContext spanContext, Severity severity, String severityText, Value<?> body, AttributesMap attributes) -
Method Summary
Modifier and TypeMethodDescription(package private) static SdkReadWriteLogRecord
create
(LogLimits logLimits, Resource resource, InstrumentationScopeInfo instrumentationScopeInfo, long timestampEpochNanos, long observedTimestampEpochNanos, SpanContext spanContext, Severity severity, String severityText, Value<?> body, AttributesMap attributes) Create the log record with the given configuration.private Attributes
setAttribute
(AttributeKey<T> key, T value) Sets an attribute on the log record.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 Details
-
logLimits
-
resource
-
instrumentationScopeInfo
-
timestampEpochNanos
private final long timestampEpochNanos -
observedTimestampEpochNanos
private final long observedTimestampEpochNanos -
spanContext
-
severity
-
severityText
-
body
-
lock
-
attributes
-
-
Constructor Details
-
SdkReadWriteLogRecord
private SdkReadWriteLogRecord(LogLimits logLimits, Resource resource, InstrumentationScopeInfo instrumentationScopeInfo, long timestampEpochNanos, long observedTimestampEpochNanos, SpanContext spanContext, Severity severity, @Nullable String severityText, @Nullable Value<?> body, @Nullable AttributesMap attributes)
-
-
Method Details
-
create
static SdkReadWriteLogRecord create(LogLimits logLimits, Resource resource, InstrumentationScopeInfo instrumentationScopeInfo, long timestampEpochNanos, long observedTimestampEpochNanos, SpanContext spanContext, Severity severity, @Nullable String severityText, @Nullable Value<?> body, @Nullable AttributesMap attributes) Create the log record with the given configuration. -
setAttribute
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
-
toLogRecordData
Description copied from interface:ReadWriteLogRecord
Return an immutableLogRecordData
instance representing this log record.- Specified by:
toLogRecordData
in interfaceReadWriteLogRecord
-