Class SdkReadWriteLogRecord
java.lang.Object
io.opentelemetry.sdk.logs.SdkReadWriteLogRecord
- All Implemented Interfaces:
ReadWriteLogRecord
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate AttributesMapprivate final Value<?> private final InstrumentationScopeInfoprivate final Objectprivate final LogLimitsprivate final longprivate final Resourceprivate final Severityprivate final Stringprivate final SpanContextprivate final long -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateSdkReadWriteLogRecord(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 SdkReadWriteLogRecordcreate(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 AttributessetAttribute(AttributeKey<T> key, T value) Sets an attribute on the log record.Return an immutableLogRecordDatainstance representing this log record.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface 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:ReadWriteLogRecordSets 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:
setAttributein interfaceReadWriteLogRecord
-
getImmutableAttributes
-
toLogRecordData
Description copied from interface:ReadWriteLogRecordReturn an immutableLogRecordDatainstance representing this log record.- Specified by:
toLogRecordDatain interfaceReadWriteLogRecord
-