Interface LogBuilder
public interface LogBuilder
Used to construct and emit logs from a
LogEmitter.
Obtain a LogBuilder via LogEmitter.logBuilder(), add properties using the
setters, and emit the log by calling emit().
This class is internal and is hence not for public use. Its APIs are unstable and can change at any time.
-
Method Summary
Modifier and TypeMethodDescriptionvoidemit()Emit the log.setAttributes(io.opentelemetry.api.common.Attributes attributes) Set the attributes.Set the body string.setContext(io.opentelemetry.context.Context context) Set the context.Set the epoch timestamp using the timestamp and unit.Set the epoch timestamp using the instant.setSeverity(Severity severity) Set the severity.setSeverityText(String severityText) Set the severity text.
-
Method Details
-
setEpoch
Set the epoch timestamp using the timestamp and unit. -
setEpoch
Set the epoch timestamp using the instant. -
setContext
Set the context. -
setSeverity
Set the severity. -
setSeverityText
Set the severity text. -
setBody
Set the body string. -
setAttributes
Set the attributes. -
emit
void emit()Emit the log.
-