Interface ExtendedLogRecordBuilder

All Superinterfaces:
io.opentelemetry.api.logs.LogRecordBuilder

public interface ExtendedLogRecordBuilder extends io.opentelemetry.api.logs.LogRecordBuilder
Extended LogRecordBuilder with experimental APIs.
  • Method Details

    • setTimestamp

      ExtendedLogRecordBuilder setTimestamp(long timestamp, TimeUnit unit)
      Specified by:
      setTimestamp in interface io.opentelemetry.api.logs.LogRecordBuilder
    • setTimestamp

      ExtendedLogRecordBuilder setTimestamp(Instant instant)
      Specified by:
      setTimestamp in interface io.opentelemetry.api.logs.LogRecordBuilder
    • setObservedTimestamp

      ExtendedLogRecordBuilder setObservedTimestamp(long timestamp, TimeUnit unit)
      Specified by:
      setObservedTimestamp in interface io.opentelemetry.api.logs.LogRecordBuilder
    • setObservedTimestamp

      ExtendedLogRecordBuilder setObservedTimestamp(Instant instant)
      Specified by:
      setObservedTimestamp in interface io.opentelemetry.api.logs.LogRecordBuilder
    • setContext

      ExtendedLogRecordBuilder setContext(io.opentelemetry.context.Context context)
      Specified by:
      setContext in interface io.opentelemetry.api.logs.LogRecordBuilder
    • setSeverity

      ExtendedLogRecordBuilder setSeverity(io.opentelemetry.api.logs.Severity severity)
      Specified by:
      setSeverity in interface io.opentelemetry.api.logs.LogRecordBuilder
    • setSeverityText

      ExtendedLogRecordBuilder setSeverityText(String severityText)
      Specified by:
      setSeverityText in interface io.opentelemetry.api.logs.LogRecordBuilder
    • setBody

      Specified by:
      setBody in interface io.opentelemetry.api.logs.LogRecordBuilder
    • setBody

      default ExtendedLogRecordBuilder setBody(io.opentelemetry.api.common.Value<?> body)
      Specified by:
      setBody in interface io.opentelemetry.api.logs.LogRecordBuilder
    • setEventName

      ExtendedLogRecordBuilder setEventName(String eventName)
      Sets the event name, which identifies the class / type of the Event.

      This name should uniquely identify the event structure (both attributes and body). A log record with a non-empty event name is an Event.

      Specified by:
      setEventName in interface io.opentelemetry.api.logs.LogRecordBuilder
    • setAllAttributes

      default ExtendedLogRecordBuilder setAllAttributes(io.opentelemetry.api.common.Attributes attributes)

      NOTE: all standard AttributeKey-value pairs can also be represented as ExtendedAttributeKey-value pairs, but not all ExtendedAttributeKey-value pairs can be represented as standard AttributeKey-value pairs. From the standpoint of the emitted log record, there is no difference between adding attributes using the standard or extended attribute APIs.

      Specified by:
      setAllAttributes in interface io.opentelemetry.api.logs.LogRecordBuilder
    • setAllAttributes

      default ExtendedLogRecordBuilder setAllAttributes(ExtendedAttributes attributes)
      Sets attributes. If the LogRecordBuilder previously contained a mapping for any of the keys, the old values are replaced by the specified values.

      NOTE: all standard AttributeKey-value pairs can also be represented as ExtendedAttributeKey-value pairs, but not all ExtendedAttributeKey-value pairs can be represented as standard AttributeKey-value pairs. From the standpoint of the emitted log record, there is no difference between adding attributes using the standard or extended attribute APIs.

    • setAttribute

      <T> ExtendedLogRecordBuilder setAttribute(io.opentelemetry.api.common.AttributeKey<T> key, @Nullable T value)

      NOTE: all standard AttributeKey-value pairs can also be represented as ExtendedAttributeKey-value pairs, but not all ExtendedAttributeKey-value pairs can be represented as standard AttributeKey-value pairs. From the standpoint of the emitted log record, there is no difference between adding attributes using the standard or extended attribute APIs.

      Specified by:
      setAttribute in interface io.opentelemetry.api.logs.LogRecordBuilder
    • setAttribute

      <T> ExtendedLogRecordBuilder setAttribute(ExtendedAttributeKey<T> key, T value)
      Set an attribute.

      NOTE: all standard AttributeKey-value pairs can also be represented as ExtendedAttributeKey-value pairs, but not all ExtendedAttributeKey-value pairs can be represented as standard AttributeKey-value pairs. From the standpoint of the emitted log record, there is no difference between adding attributes using the standard or extended attribute APIs.

    • setException

      ExtendedLogRecordBuilder setException(Throwable throwable)
      Set standard exception.* attributes based on the throwable.