Class ExtendedDefaultLogger.NoopLogRecordBuilder
- java.lang.Object
-
- io.opentelemetry.api.incubator.logs.ExtendedDefaultLogger.NoopLogRecordBuilder
-
- All Implemented Interfaces:
ExtendedLogRecordBuilder,LogRecordBuilder
- Enclosing class:
- ExtendedDefaultLogger
private static final class ExtendedDefaultLogger.NoopLogRecordBuilder extends java.lang.Object implements ExtendedLogRecordBuilder
-
-
Constructor Summary
Constructors Modifier Constructor Description privateNoopLogRecordBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidemit()Emit the log record.<T> LogRecordBuildersetAttribute(AttributeKey<T> key, T value)Sets an attribute.LogRecordBuildersetBody(Value<?> body)Set the bodyValue.LogRecordBuildersetBody(java.lang.String body)Set the body string.LogRecordBuildersetContext(Context context)Set the context.LogRecordBuildersetObservedTimestamp(long timestamp, java.util.concurrent.TimeUnit unit)Set the epochobservedTimestamp, using the timestamp and unit.LogRecordBuildersetObservedTimestamp(java.time.Instant instant)Set theobservedTimestamp, using the instant.LogRecordBuildersetSeverity(Severity severity)Set the severity.LogRecordBuildersetSeverityText(java.lang.String severityText)Set the severity text.LogRecordBuildersetTimestamp(long timestamp, java.util.concurrent.TimeUnit unit)Set the epochtimestamp, using the timestamp and unit.LogRecordBuildersetTimestamp(java.time.Instant instant)Set the epochtimestamp, using the instant.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.opentelemetry.api.logs.LogRecordBuilder
setAllAttributes
-
-
-
-
Method Detail
-
setTimestamp
public LogRecordBuilder setTimestamp(long timestamp, java.util.concurrent.TimeUnit unit)
Description copied from interface:LogRecordBuilderSet the epochtimestamp, using the timestamp and unit.The
timestampis the time at which the log record occurred. If unset, it will be set to the current time whenLogRecordBuilder.emit()is called.- Specified by:
setTimestampin interfaceLogRecordBuilder
-
setTimestamp
public LogRecordBuilder setTimestamp(java.time.Instant instant)
Description copied from interface:LogRecordBuilderSet the epochtimestamp, using the instant.The
timestampis the time at which the log record occurred. If unset, it will be set to the current time whenLogRecordBuilder.emit()is called.- Specified by:
setTimestampin interfaceLogRecordBuilder
-
setObservedTimestamp
public LogRecordBuilder setObservedTimestamp(long timestamp, java.util.concurrent.TimeUnit unit)
Description copied from interface:LogRecordBuilderSet the epochobservedTimestamp, using the timestamp and unit.The
observedTimestampis the time at which the log record was observed. If unset, it will be set to thetimestamp.observedTimestampmay be different fromtimestampif logs are being processed asynchronously (e.g. from a file or on a different thread).- Specified by:
setObservedTimestampin interfaceLogRecordBuilder
-
setObservedTimestamp
public LogRecordBuilder setObservedTimestamp(java.time.Instant instant)
Description copied from interface:LogRecordBuilderSet theobservedTimestamp, using the instant.The
observedTimestampis the time at which the log record was observed. If unset, it will be set to thetimestamp.observedTimestampmay be different fromtimestampif logs are being processed asynchronously (e.g. from a file or on a different thread).- Specified by:
setObservedTimestampin interfaceLogRecordBuilder
-
setContext
public LogRecordBuilder setContext(Context context)
Description copied from interface:LogRecordBuilderSet the context.- Specified by:
setContextin interfaceLogRecordBuilder
-
setSeverity
public LogRecordBuilder setSeverity(Severity severity)
Description copied from interface:LogRecordBuilderSet the severity.- Specified by:
setSeverityin interfaceLogRecordBuilder
-
setSeverityText
public LogRecordBuilder setSeverityText(java.lang.String severityText)
Description copied from interface:LogRecordBuilderSet the severity text.- Specified by:
setSeverityTextin interfaceLogRecordBuilder
-
setBody
public LogRecordBuilder setBody(java.lang.String body)
Description copied from interface:LogRecordBuilderSet the body string.Shorthand for calling
LogRecordBuilder.setBody(Value)withValue.of(String).- Specified by:
setBodyin interfaceLogRecordBuilder
-
setBody
public LogRecordBuilder setBody(Value<?> body)
Description copied from interface:LogRecordBuilderSet the bodyValue.- Specified by:
setBodyin interfaceLogRecordBuilder
-
setAttribute
public <T> LogRecordBuilder setAttribute(AttributeKey<T> key, T value)
Description copied from interface:LogRecordBuilderSets an attribute.- Specified by:
setAttributein interfaceLogRecordBuilder
-
emit
public void emit()
Description copied from interface:LogRecordBuilderEmit the log record.- Specified by:
emitin interfaceLogRecordBuilder
-
-