Package io.opentelemetry.proto.logs.v1
Class LogRecord.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.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.GeneratedMessage.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.mdProtobuf type
opentelemetry.proto.logs.v1.LogRecord-
Method Summary
Modifier and TypeMethodDescriptionaddAllAttributes(Iterable<? extends KeyValue> values) Additional attributes that describe the specific event occurrence.addAttributes(int index, KeyValue value) Additional attributes that describe the specific event occurrence.addAttributes(int index, KeyValue.Builder builderForValue) Additional attributes that describe the specific event occurrence.addAttributes(KeyValue value) Additional attributes that describe the specific event occurrence.addAttributes(KeyValue.Builder builderForValue) Additional attributes that describe the specific event occurrence.Additional attributes that describe the specific event occurrence.addAttributesBuilder(int index) Additional attributes that describe the specific event occurrence.build()clear()Additional attributes that describe the specific event occurrence.A value containing the body of the log record.uint32 dropped_attributes_count = 7;A unique identifier of event category/type.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.Time when the event was observed by the collection system.Numerical value of the severity, normalized to values described in Log Data Model.The severity text (also known as log level).A unique identifier for a span within a trace, assigned when the span is created.time_unix_nano is the time when the event occurred.A unique identifier for a trace.getAttributes(int index) Additional attributes that describe the specific event occurrence.getAttributesBuilder(int index) Additional attributes that describe the specific event occurrence.Additional attributes that describe the specific event occurrence.intAdditional attributes that describe the specific event occurrence.Additional attributes that describe the specific event occurrence.getAttributesOrBuilder(int index) Additional attributes that describe the specific event occurrence.List<? extends KeyValueOrBuilder>Additional attributes that describe the specific event occurrence.getBody()A value containing the body of the log record.A value containing the body of the log record.A value containing the body of the log record.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.Descriptorintuint32 dropped_attributes_count = 7;A unique identifier of event category/type.com.google.protobuf.ByteStringA unique identifier of event category/type.intgetFlags()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.longTime when the event was observed by the collection system.Numerical value of the severity, normalized to values described in Log Data Model.intNumerical value of the severity, normalized to values described in Log Data Model.The severity text (also known as log level).com.google.protobuf.ByteStringThe severity text (also known as log level).com.google.protobuf.ByteStringA unique identifier for a span within a trace, assigned when the span is created.longtime_unix_nano is the time when the event occurred.com.google.protobuf.ByteStringA unique identifier for a trace.booleanhasBody()A value containing the body of the log record.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanA value containing the body of the log record.mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) removeAttributes(int index) Additional attributes that describe the specific event occurrence.setAttributes(int index, KeyValue value) Additional attributes that describe the specific event occurrence.setAttributes(int index, KeyValue.Builder builderForValue) Additional attributes that describe the specific event occurrence.A value containing the body of the log record.setBody(AnyValue.Builder builderForValue) A value containing the body of the log record.setDroppedAttributesCount(int value) uint32 dropped_attributes_count = 7;setEventName(String value) A unique identifier of event category/type.setEventNameBytes(com.google.protobuf.ByteString value) A unique identifier of event category/type.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.setObservedTimeUnixNano(long value) Time when the event was observed by the collection system.setSeverityNumber(SeverityNumber value) Numerical value of the severity, normalized to values described in Log Data Model.setSeverityNumberValue(int value) Numerical value of the severity, normalized to values described in Log Data Model.setSeverityText(String value) The severity text (also known as log level).setSeverityTextBytes(com.google.protobuf.ByteString value) The severity text (also known as log level).setSpanId(com.google.protobuf.ByteString value) A unique identifier for a span within a trace, assigned when the span is created.setTimeUnixNano(long value) time_unix_nano is the time when the event occurred.setTraceId(com.google.protobuf.ByteString value) A unique identifier for a trace.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<LogRecord.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<LogRecord.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<LogRecord.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<LogRecord.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<LogRecord.Builder>
-
mergeFrom
public LogRecord.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.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:
getTimeUnixNanoin interfaceLogRecordOrBuilder- Returns:
- The timeUnixNano.
-
setTimeUnixNano
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
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:
getObservedTimeUnixNanoin interfaceLogRecordOrBuilder- Returns:
- The observedTimeUnixNano.
-
setObservedTimeUnixNano
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
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:
getSeverityNumberValuein interfaceLogRecordOrBuilder- Returns:
- The enum numeric value on the wire for severityNumber.
-
setSeverityNumberValue
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
Numerical value of the severity, normalized to values described in Log Data Model. [Optional].
.opentelemetry.proto.logs.v1.SeverityNumber severity_number = 2;- Specified by:
getSeverityNumberin interfaceLogRecordOrBuilder- Returns:
- The severityNumber.
-
setSeverityNumber
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
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
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:
getSeverityTextin interfaceLogRecordOrBuilder- 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:
getSeverityTextBytesin interfaceLogRecordOrBuilder- Returns:
- The bytes for severityText.
-
setSeverityText
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
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
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:
hasBodyin interfaceLogRecordOrBuilder- Returns:
- Whether the body field is set.
-
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:
getBodyin interfaceLogRecordOrBuilder- Returns:
- The body.
-
setBody
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
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
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
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
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
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:
getBodyOrBuilderin interfaceLogRecordOrBuilder
-
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:
getAttributesListin interfaceLogRecordOrBuilder
-
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:
getAttributesCountin interfaceLogRecordOrBuilder
-
getAttributes
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:
getAttributesin interfaceLogRecordOrBuilder
-
setAttributes
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
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
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
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
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
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
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
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
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
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
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:
getAttributesOrBuilderin interfaceLogRecordOrBuilder
-
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:
getAttributesOrBuilderListin interfaceLogRecordOrBuilder
-
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
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
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:
getDroppedAttributesCountin interfaceLogRecordOrBuilder- Returns:
- The droppedAttributesCount.
-
setDroppedAttributesCount
uint32 dropped_attributes_count = 7;- Parameters:
value- The droppedAttributesCount to set.- Returns:
- This builder for chaining.
-
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:
getFlagsin interfaceLogRecordOrBuilder- Returns:
- The flags.
-
setFlags
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
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:
getTraceIdin interfaceLogRecordOrBuilder- Returns:
- The traceId.
-
setTraceId
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
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:
getSpanIdin interfaceLogRecordOrBuilder- Returns:
- The spanId.
-
setSpanId
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
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.
-
getEventName
A unique identifier of event category/type. All events with the same event_name are expected to conform to the same schema for both their attributes and their body. Recommended to be fully qualified and short (no longer than 256 characters). Presence of event_name on the log record identifies this record as an event. [Optional]. Status: [Development]
string event_name = 12;- Specified by:
getEventNamein interfaceLogRecordOrBuilder- Returns:
- The eventName.
-
getEventNameBytes
public com.google.protobuf.ByteString getEventNameBytes()A unique identifier of event category/type. All events with the same event_name are expected to conform to the same schema for both their attributes and their body. Recommended to be fully qualified and short (no longer than 256 characters). Presence of event_name on the log record identifies this record as an event. [Optional]. Status: [Development]
string event_name = 12;- Specified by:
getEventNameBytesin interfaceLogRecordOrBuilder- Returns:
- The bytes for eventName.
-
setEventName
A unique identifier of event category/type. All events with the same event_name are expected to conform to the same schema for both their attributes and their body. Recommended to be fully qualified and short (no longer than 256 characters). Presence of event_name on the log record identifies this record as an event. [Optional]. Status: [Development]
string event_name = 12;- Parameters:
value- The eventName to set.- Returns:
- This builder for chaining.
-
clearEventName
A unique identifier of event category/type. All events with the same event_name are expected to conform to the same schema for both their attributes and their body. Recommended to be fully qualified and short (no longer than 256 characters). Presence of event_name on the log record identifies this record as an event. [Optional]. Status: [Development]
string event_name = 12;- Returns:
- This builder for chaining.
-
setEventNameBytes
A unique identifier of event category/type. All events with the same event_name are expected to conform to the same schema for both their attributes and their body. Recommended to be fully qualified and short (no longer than 256 characters). Presence of event_name on the log record identifies this record as an event. [Optional]. Status: [Development]
string event_name = 12;- Parameters:
value- The bytes for eventName to set.- Returns:
- This builder for chaining.
-