Class LogRecord.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.Builder<LogRecord.Builder>
io.opentelemetry.proto.logs.v1.LogRecord.Builder
All Implemented Interfaces:
com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, LogRecordOrBuilder, Cloneable
Enclosing class:
LogRecord

public static final class LogRecord.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<LogRecord.Builder> implements LogRecordOrBuilder
 A log record according to OpenTelemetry Log Data Model:
 https://github.com/open-telemetry/oteps/blob/main/text/logs/0097-log-data-model.md
 
Protobuf type opentelemetry.proto.logs.v1.LogRecord
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<LogRecord.Builder>
    • clear

      public LogRecord.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessageV3.Builder<LogRecord.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<LogRecord.Builder>
    • getDefaultInstanceForType

      public LogRecord getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public LogRecord build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public LogRecord buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • clone

      public LogRecord.Builder clone()
      Specified by:
      clone in interface com.google.protobuf.Message.Builder
      Specified by:
      clone in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clone in class com.google.protobuf.GeneratedMessageV3.Builder<LogRecord.Builder>
    • setField

      public LogRecord.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      setField in interface com.google.protobuf.Message.Builder
      Overrides:
      setField in class com.google.protobuf.GeneratedMessageV3.Builder<LogRecord.Builder>
    • clearField

      public LogRecord.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
      Specified by:
      clearField in interface com.google.protobuf.Message.Builder
      Overrides:
      clearField in class com.google.protobuf.GeneratedMessageV3.Builder<LogRecord.Builder>
    • clearOneof

      public LogRecord.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
      Specified by:
      clearOneof in interface com.google.protobuf.Message.Builder
      Overrides:
      clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<LogRecord.Builder>
    • setRepeatedField

      public LogRecord.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
      Specified by:
      setRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<LogRecord.Builder>
    • addRepeatedField

      public LogRecord.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
      Specified by:
      addRepeatedField in interface com.google.protobuf.Message.Builder
      Overrides:
      addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<LogRecord.Builder>
    • mergeFrom

      public LogRecord.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<LogRecord.Builder>
    • mergeFrom

      public LogRecord.Builder mergeFrom(LogRecord other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<LogRecord.Builder>
    • mergeFrom

      public LogRecord.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<LogRecord.Builder>
      Throws:
      IOException
    • getTimeUnixNano

      public long getTimeUnixNano()
       time_unix_nano is the time when the event occurred.
       Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
       Value of 0 indicates unknown or missing timestamp.
       
      fixed64 time_unix_nano = 1;
      Specified by:
      getTimeUnixNano in interface LogRecordOrBuilder
      Returns:
      The timeUnixNano.
    • setTimeUnixNano

      public LogRecord.Builder setTimeUnixNano(long value)
       time_unix_nano is the time when the event occurred.
       Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
       Value of 0 indicates unknown or missing timestamp.
       
      fixed64 time_unix_nano = 1;
      Parameters:
      value - The timeUnixNano to set.
      Returns:
      This builder for chaining.
    • clearTimeUnixNano

      public LogRecord.Builder clearTimeUnixNano()
       time_unix_nano is the time when the event occurred.
       Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
       Value of 0 indicates unknown or missing timestamp.
       
      fixed64 time_unix_nano = 1;
      Returns:
      This builder for chaining.
    • getObservedTimeUnixNano

      public long getObservedTimeUnixNano()
       Time when the event was observed by the collection system.
       For events that originate in OpenTelemetry (e.g. using OpenTelemetry Logging SDK)
       this timestamp is typically set at the generation time and is equal to Timestamp.
       For events originating externally and collected by OpenTelemetry (e.g. using
       Collector) this is the time when OpenTelemetry's code observed the event measured
       by the clock of the OpenTelemetry code. This field MUST be set once the event is
       observed by OpenTelemetry.
      
       For converting OpenTelemetry log data to formats that support only one timestamp or
       when receiving OpenTelemetry log data by recipients that support only one timestamp
       internally the following logic is recommended:
         - Use time_unix_nano if it is present, otherwise use observed_time_unix_nano.
      
       Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
       Value of 0 indicates unknown or missing timestamp.
       
      fixed64 observed_time_unix_nano = 11;
      Specified by:
      getObservedTimeUnixNano in interface LogRecordOrBuilder
      Returns:
      The observedTimeUnixNano.
    • setObservedTimeUnixNano

      public LogRecord.Builder setObservedTimeUnixNano(long value)
       Time when the event was observed by the collection system.
       For events that originate in OpenTelemetry (e.g. using OpenTelemetry Logging SDK)
       this timestamp is typically set at the generation time and is equal to Timestamp.
       For events originating externally and collected by OpenTelemetry (e.g. using
       Collector) this is the time when OpenTelemetry's code observed the event measured
       by the clock of the OpenTelemetry code. This field MUST be set once the event is
       observed by OpenTelemetry.
      
       For converting OpenTelemetry log data to formats that support only one timestamp or
       when receiving OpenTelemetry log data by recipients that support only one timestamp
       internally the following logic is recommended:
         - Use time_unix_nano if it is present, otherwise use observed_time_unix_nano.
      
       Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
       Value of 0 indicates unknown or missing timestamp.
       
      fixed64 observed_time_unix_nano = 11;
      Parameters:
      value - The observedTimeUnixNano to set.
      Returns:
      This builder for chaining.
    • clearObservedTimeUnixNano

      public LogRecord.Builder clearObservedTimeUnixNano()
       Time when the event was observed by the collection system.
       For events that originate in OpenTelemetry (e.g. using OpenTelemetry Logging SDK)
       this timestamp is typically set at the generation time and is equal to Timestamp.
       For events originating externally and collected by OpenTelemetry (e.g. using
       Collector) this is the time when OpenTelemetry's code observed the event measured
       by the clock of the OpenTelemetry code. This field MUST be set once the event is
       observed by OpenTelemetry.
      
       For converting OpenTelemetry log data to formats that support only one timestamp or
       when receiving OpenTelemetry log data by recipients that support only one timestamp
       internally the following logic is recommended:
         - Use time_unix_nano if it is present, otherwise use observed_time_unix_nano.
      
       Value is UNIX Epoch time in nanoseconds since 00:00:00 UTC on 1 January 1970.
       Value of 0 indicates unknown or missing timestamp.
       
      fixed64 observed_time_unix_nano = 11;
      Returns:
      This builder for chaining.
    • getSeverityNumberValue

      public int getSeverityNumberValue()
       Numerical value of the severity, normalized to values described in Log Data Model.
       [Optional].
       
      .opentelemetry.proto.logs.v1.SeverityNumber severity_number = 2;
      Specified by:
      getSeverityNumberValue in interface LogRecordOrBuilder
      Returns:
      The enum numeric value on the wire for severityNumber.
    • setSeverityNumberValue

      public LogRecord.Builder setSeverityNumberValue(int value)
       Numerical value of the severity, normalized to values described in Log Data Model.
       [Optional].
       
      .opentelemetry.proto.logs.v1.SeverityNumber severity_number = 2;
      Parameters:
      value - The enum numeric value on the wire for severityNumber to set.
      Returns:
      This builder for chaining.
    • getSeverityNumber

      public SeverityNumber getSeverityNumber()
       Numerical value of the severity, normalized to values described in Log Data Model.
       [Optional].
       
      .opentelemetry.proto.logs.v1.SeverityNumber severity_number = 2;
      Specified by:
      getSeverityNumber in interface LogRecordOrBuilder
      Returns:
      The severityNumber.
    • setSeverityNumber

      public LogRecord.Builder setSeverityNumber(SeverityNumber value)
       Numerical value of the severity, normalized to values described in Log Data Model.
       [Optional].
       
      .opentelemetry.proto.logs.v1.SeverityNumber severity_number = 2;
      Parameters:
      value - The severityNumber to set.
      Returns:
      This builder for chaining.
    • clearSeverityNumber

      public LogRecord.Builder clearSeverityNumber()
       Numerical value of the severity, normalized to values described in Log Data Model.
       [Optional].
       
      .opentelemetry.proto.logs.v1.SeverityNumber severity_number = 2;
      Returns:
      This builder for chaining.
    • getSeverityText

      public String getSeverityText()
       The severity text (also known as log level). The original string representation as
       it is known at the source. [Optional].
       
      string severity_text = 3;
      Specified by:
      getSeverityText in interface LogRecordOrBuilder
      Returns:
      The severityText.
    • getSeverityTextBytes

      public com.google.protobuf.ByteString getSeverityTextBytes()
       The severity text (also known as log level). The original string representation as
       it is known at the source. [Optional].
       
      string severity_text = 3;
      Specified by:
      getSeverityTextBytes in interface LogRecordOrBuilder
      Returns:
      The bytes for severityText.
    • setSeverityText

      public LogRecord.Builder setSeverityText(String value)
       The severity text (also known as log level). The original string representation as
       it is known at the source. [Optional].
       
      string severity_text = 3;
      Parameters:
      value - The severityText to set.
      Returns:
      This builder for chaining.
    • clearSeverityText

      public LogRecord.Builder clearSeverityText()
       The severity text (also known as log level). The original string representation as
       it is known at the source. [Optional].
       
      string severity_text = 3;
      Returns:
      This builder for chaining.
    • setSeverityTextBytes

      public LogRecord.Builder setSeverityTextBytes(com.google.protobuf.ByteString value)
       The severity text (also known as log level). The original string representation as
       it is known at the source. [Optional].
       
      string severity_text = 3;
      Parameters:
      value - The bytes for severityText to set.
      Returns:
      This builder for chaining.
    • hasBody

      public boolean hasBody()
       A value containing the body of the log record. Can be for example a human-readable
       string message (including multi-line) describing the event in a free form or it can
       be a structured data composed of arrays and maps of other values. [Optional].
       
      .opentelemetry.proto.common.v1.AnyValue body = 5;
      Specified by:
      hasBody in interface LogRecordOrBuilder
      Returns:
      Whether the body field is set.
    • getBody

      public AnyValue getBody()
       A value containing the body of the log record. Can be for example a human-readable
       string message (including multi-line) describing the event in a free form or it can
       be a structured data composed of arrays and maps of other values. [Optional].
       
      .opentelemetry.proto.common.v1.AnyValue body = 5;
      Specified by:
      getBody in interface LogRecordOrBuilder
      Returns:
      The body.
    • setBody

      public LogRecord.Builder setBody(AnyValue value)
       A value containing the body of the log record. Can be for example a human-readable
       string message (including multi-line) describing the event in a free form or it can
       be a structured data composed of arrays and maps of other values. [Optional].
       
      .opentelemetry.proto.common.v1.AnyValue body = 5;
    • setBody

      public LogRecord.Builder setBody(AnyValue.Builder builderForValue)
       A value containing the body of the log record. Can be for example a human-readable
       string message (including multi-line) describing the event in a free form or it can
       be a structured data composed of arrays and maps of other values. [Optional].
       
      .opentelemetry.proto.common.v1.AnyValue body = 5;
    • mergeBody

      public LogRecord.Builder mergeBody(AnyValue value)
       A value containing the body of the log record. Can be for example a human-readable
       string message (including multi-line) describing the event in a free form or it can
       be a structured data composed of arrays and maps of other values. [Optional].
       
      .opentelemetry.proto.common.v1.AnyValue body = 5;
    • clearBody

      public LogRecord.Builder clearBody()
       A value containing the body of the log record. Can be for example a human-readable
       string message (including multi-line) describing the event in a free form or it can
       be a structured data composed of arrays and maps of other values. [Optional].
       
      .opentelemetry.proto.common.v1.AnyValue body = 5;
    • getBodyBuilder

      public AnyValue.Builder getBodyBuilder()
       A value containing the body of the log record. Can be for example a human-readable
       string message (including multi-line) describing the event in a free form or it can
       be a structured data composed of arrays and maps of other values. [Optional].
       
      .opentelemetry.proto.common.v1.AnyValue body = 5;
    • getBodyOrBuilder

      public AnyValueOrBuilder getBodyOrBuilder()
       A value containing the body of the log record. Can be for example a human-readable
       string message (including multi-line) describing the event in a free form or it can
       be a structured data composed of arrays and maps of other values. [Optional].
       
      .opentelemetry.proto.common.v1.AnyValue body = 5;
      Specified by:
      getBodyOrBuilder in interface LogRecordOrBuilder
    • getAttributesList

      public List<KeyValue> getAttributesList()
       Additional attributes that describe the specific event occurrence. [Optional].
       Attribute keys MUST be unique (it is not allowed to have more than one
       attribute with the same key).
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 6;
      Specified by:
      getAttributesList in interface LogRecordOrBuilder
    • getAttributesCount

      public int getAttributesCount()
       Additional attributes that describe the specific event occurrence. [Optional].
       Attribute keys MUST be unique (it is not allowed to have more than one
       attribute with the same key).
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 6;
      Specified by:
      getAttributesCount in interface LogRecordOrBuilder
    • getAttributes

      public KeyValue getAttributes(int index)
       Additional attributes that describe the specific event occurrence. [Optional].
       Attribute keys MUST be unique (it is not allowed to have more than one
       attribute with the same key).
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 6;
      Specified by:
      getAttributes in interface LogRecordOrBuilder
    • setAttributes

      public LogRecord.Builder setAttributes(int index, KeyValue value)
       Additional attributes that describe the specific event occurrence. [Optional].
       Attribute keys MUST be unique (it is not allowed to have more than one
       attribute with the same key).
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 6;
    • setAttributes

      public LogRecord.Builder setAttributes(int index, KeyValue.Builder builderForValue)
       Additional attributes that describe the specific event occurrence. [Optional].
       Attribute keys MUST be unique (it is not allowed to have more than one
       attribute with the same key).
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 6;
    • addAttributes

      public LogRecord.Builder addAttributes(KeyValue value)
       Additional attributes that describe the specific event occurrence. [Optional].
       Attribute keys MUST be unique (it is not allowed to have more than one
       attribute with the same key).
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 6;
    • addAttributes

      public LogRecord.Builder addAttributes(int index, KeyValue value)
       Additional attributes that describe the specific event occurrence. [Optional].
       Attribute keys MUST be unique (it is not allowed to have more than one
       attribute with the same key).
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 6;
    • addAttributes

      public LogRecord.Builder addAttributes(KeyValue.Builder builderForValue)
       Additional attributes that describe the specific event occurrence. [Optional].
       Attribute keys MUST be unique (it is not allowed to have more than one
       attribute with the same key).
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 6;
    • addAttributes

      public LogRecord.Builder addAttributes(int index, KeyValue.Builder builderForValue)
       Additional attributes that describe the specific event occurrence. [Optional].
       Attribute keys MUST be unique (it is not allowed to have more than one
       attribute with the same key).
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 6;
    • addAllAttributes

      public LogRecord.Builder addAllAttributes(Iterable<? extends KeyValue> values)
       Additional attributes that describe the specific event occurrence. [Optional].
       Attribute keys MUST be unique (it is not allowed to have more than one
       attribute with the same key).
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 6;
    • clearAttributes

      public LogRecord.Builder clearAttributes()
       Additional attributes that describe the specific event occurrence. [Optional].
       Attribute keys MUST be unique (it is not allowed to have more than one
       attribute with the same key).
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 6;
    • removeAttributes

      public LogRecord.Builder removeAttributes(int index)
       Additional attributes that describe the specific event occurrence. [Optional].
       Attribute keys MUST be unique (it is not allowed to have more than one
       attribute with the same key).
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 6;
    • getAttributesBuilder

      public KeyValue.Builder getAttributesBuilder(int index)
       Additional attributes that describe the specific event occurrence. [Optional].
       Attribute keys MUST be unique (it is not allowed to have more than one
       attribute with the same key).
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 6;
    • getAttributesOrBuilder

      public KeyValueOrBuilder getAttributesOrBuilder(int index)
       Additional attributes that describe the specific event occurrence. [Optional].
       Attribute keys MUST be unique (it is not allowed to have more than one
       attribute with the same key).
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 6;
      Specified by:
      getAttributesOrBuilder in interface LogRecordOrBuilder
    • getAttributesOrBuilderList

      public List<? extends KeyValueOrBuilder> getAttributesOrBuilderList()
       Additional attributes that describe the specific event occurrence. [Optional].
       Attribute keys MUST be unique (it is not allowed to have more than one
       attribute with the same key).
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 6;
      Specified by:
      getAttributesOrBuilderList in interface LogRecordOrBuilder
    • addAttributesBuilder

      public KeyValue.Builder addAttributesBuilder()
       Additional attributes that describe the specific event occurrence. [Optional].
       Attribute keys MUST be unique (it is not allowed to have more than one
       attribute with the same key).
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 6;
    • addAttributesBuilder

      public KeyValue.Builder addAttributesBuilder(int index)
       Additional attributes that describe the specific event occurrence. [Optional].
       Attribute keys MUST be unique (it is not allowed to have more than one
       attribute with the same key).
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 6;
    • getAttributesBuilderList

      public List<KeyValue.Builder> getAttributesBuilderList()
       Additional attributes that describe the specific event occurrence. [Optional].
       Attribute keys MUST be unique (it is not allowed to have more than one
       attribute with the same key).
       
      repeated .opentelemetry.proto.common.v1.KeyValue attributes = 6;
    • getDroppedAttributesCount

      public int getDroppedAttributesCount()
      uint32 dropped_attributes_count = 7;
      Specified by:
      getDroppedAttributesCount in interface LogRecordOrBuilder
      Returns:
      The droppedAttributesCount.
    • setDroppedAttributesCount

      public LogRecord.Builder setDroppedAttributesCount(int value)
      uint32 dropped_attributes_count = 7;
      Parameters:
      value - The droppedAttributesCount to set.
      Returns:
      This builder for chaining.
    • clearDroppedAttributesCount

      public LogRecord.Builder clearDroppedAttributesCount()
      uint32 dropped_attributes_count = 7;
      Returns:
      This builder for chaining.
    • getFlags

      public int getFlags()
       Flags, a bit field. 8 least significant bits are the trace flags as
       defined in W3C Trace Context specification. 24 most significant bits are reserved
       and must be set to 0. Readers must not assume that 24 most significant bits
       will be zero and must correctly mask the bits when reading 8-bit trace flag (use
       flags & LOG_RECORD_FLAGS_TRACE_FLAGS_MASK). [Optional].
       
      fixed32 flags = 8;
      Specified by:
      getFlags in interface LogRecordOrBuilder
      Returns:
      The flags.
    • setFlags

      public LogRecord.Builder setFlags(int value)
       Flags, a bit field. 8 least significant bits are the trace flags as
       defined in W3C Trace Context specification. 24 most significant bits are reserved
       and must be set to 0. Readers must not assume that 24 most significant bits
       will be zero and must correctly mask the bits when reading 8-bit trace flag (use
       flags & LOG_RECORD_FLAGS_TRACE_FLAGS_MASK). [Optional].
       
      fixed32 flags = 8;
      Parameters:
      value - The flags to set.
      Returns:
      This builder for chaining.
    • clearFlags

      public LogRecord.Builder clearFlags()
       Flags, a bit field. 8 least significant bits are the trace flags as
       defined in W3C Trace Context specification. 24 most significant bits are reserved
       and must be set to 0. Readers must not assume that 24 most significant bits
       will be zero and must correctly mask the bits when reading 8-bit trace flag (use
       flags & LOG_RECORD_FLAGS_TRACE_FLAGS_MASK). [Optional].
       
      fixed32 flags = 8;
      Returns:
      This builder for chaining.
    • getTraceId

      public com.google.protobuf.ByteString getTraceId()
       A unique identifier for a trace. All logs from the same trace share
       the same `trace_id`. The ID is a 16-byte array. An ID with all zeroes OR
       of length other than 16 bytes is considered invalid (empty string in OTLP/JSON
       is zero-length and thus is also invalid).
      
       This field is optional.
      
       The receivers SHOULD assume that the log record is not associated with a
       trace if any of the following is true:
         - the field is not present,
         - the field contains an invalid value.
       
      bytes trace_id = 9;
      Specified by:
      getTraceId in interface LogRecordOrBuilder
      Returns:
      The traceId.
    • setTraceId

      public LogRecord.Builder setTraceId(com.google.protobuf.ByteString value)
       A unique identifier for a trace. All logs from the same trace share
       the same `trace_id`. The ID is a 16-byte array. An ID with all zeroes OR
       of length other than 16 bytes is considered invalid (empty string in OTLP/JSON
       is zero-length and thus is also invalid).
      
       This field is optional.
      
       The receivers SHOULD assume that the log record is not associated with a
       trace if any of the following is true:
         - the field is not present,
         - the field contains an invalid value.
       
      bytes trace_id = 9;
      Parameters:
      value - The traceId to set.
      Returns:
      This builder for chaining.
    • clearTraceId

      public LogRecord.Builder clearTraceId()
       A unique identifier for a trace. All logs from the same trace share
       the same `trace_id`. The ID is a 16-byte array. An ID with all zeroes OR
       of length other than 16 bytes is considered invalid (empty string in OTLP/JSON
       is zero-length and thus is also invalid).
      
       This field is optional.
      
       The receivers SHOULD assume that the log record is not associated with a
       trace if any of the following is true:
         - the field is not present,
         - the field contains an invalid value.
       
      bytes trace_id = 9;
      Returns:
      This builder for chaining.
    • getSpanId

      public com.google.protobuf.ByteString getSpanId()
       A unique identifier for a span within a trace, assigned when the span
       is created. The ID is an 8-byte array. An ID with all zeroes OR of length
       other than 8 bytes is considered invalid (empty string in OTLP/JSON
       is zero-length and thus is also invalid).
      
       This field is optional. If the sender specifies a valid span_id then it SHOULD also
       specify a valid trace_id.
      
       The receivers SHOULD assume that the log record is not associated with a
       span if any of the following is true:
         - the field is not present,
         - the field contains an invalid value.
       
      bytes span_id = 10;
      Specified by:
      getSpanId in interface LogRecordOrBuilder
      Returns:
      The spanId.
    • setSpanId

      public LogRecord.Builder setSpanId(com.google.protobuf.ByteString value)
       A unique identifier for a span within a trace, assigned when the span
       is created. The ID is an 8-byte array. An ID with all zeroes OR of length
       other than 8 bytes is considered invalid (empty string in OTLP/JSON
       is zero-length and thus is also invalid).
      
       This field is optional. If the sender specifies a valid span_id then it SHOULD also
       specify a valid trace_id.
      
       The receivers SHOULD assume that the log record is not associated with a
       span if any of the following is true:
         - the field is not present,
         - the field contains an invalid value.
       
      bytes span_id = 10;
      Parameters:
      value - The spanId to set.
      Returns:
      This builder for chaining.
    • clearSpanId

      public LogRecord.Builder clearSpanId()
       A unique identifier for a span within a trace, assigned when the span
       is created. The ID is an 8-byte array. An ID with all zeroes OR of length
       other than 8 bytes is considered invalid (empty string in OTLP/JSON
       is zero-length and thus is also invalid).
      
       This field is optional. If the sender specifies a valid span_id then it SHOULD also
       specify a valid trace_id.
      
       The receivers SHOULD assume that the log record is not associated with a
       span if any of the following is true:
         - the field is not present,
         - the field contains an invalid value.
       
      bytes span_id = 10;
      Returns:
      This builder for chaining.
    • setUnknownFields

      public final LogRecord.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      setUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<LogRecord.Builder>
    • mergeUnknownFields

      public final LogRecord.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
      Specified by:
      mergeUnknownFields in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<LogRecord.Builder>