Interface LogRecordOrBuilder

All Superinterfaces:
com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder
All Known Implementing Classes:
LogRecord, LogRecord.Builder

public interface LogRecordOrBuilder extends com.google.protobuf.MessageOrBuilder
  • Method Summary

    Modifier and Type
    Method
    Description
    getAttributes(int index)
    Additional attributes that describe the specific event occurrence.
    int
    Additional attributes that describe the specific event occurrence.
    Additional attributes that describe the specific event occurrence.
    Additional attributes that describe the specific event occurrence.
    Additional attributes that describe the specific event occurrence.
    A value containing the body of the log record.
    A value containing the body of the log record.
    int
    uint32 dropped_attributes_count = 7;
    int
    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.
    long
    Time when the event was observed by the collection system.
    Numerical value of the severity, normalized to values described in Log Data Model.
    int
    Numerical value of the severity, normalized to values described in Log Data Model.
    The severity text (also known as log level).
    com.google.protobuf.ByteString
    The severity text (also known as log level).
    com.google.protobuf.ByteString
    A unique identifier for a span within a trace, assigned when the span is created.
    long
    time_unix_nano is the time when the event occurred.
    com.google.protobuf.ByteString
    A unique identifier for a trace.
    boolean
    A value containing the body of the log record.

    Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder

    isInitialized

    Methods inherited from interface com.google.protobuf.MessageOrBuilder

    findInitializationErrors, getAllFields, getDefaultInstanceForType, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
  • Method Details

    • getTimeUnixNano

      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;
      Returns:
      The timeUnixNano.
    • getObservedTimeUnixNano

      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;
      Returns:
      The observedTimeUnixNano.
    • getSeverityNumberValue

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

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

      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;
      Returns:
      The severityText.
    • getSeverityTextBytes

      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;
      Returns:
      The bytes for severityText.
    • hasBody

      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;
      Returns:
      Whether the body field is set.
    • getBody

      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;
      Returns:
      The body.
    • getBodyOrBuilder

      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;
    • getAttributesList

      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;
    • getAttributes

      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;
    • getAttributesCount

      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;
    • getAttributesOrBuilderList

      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;
    • getAttributesOrBuilder

      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;
    • getDroppedAttributesCount

      int getDroppedAttributesCount()
      uint32 dropped_attributes_count = 7;
      Returns:
      The droppedAttributesCount.
    • getFlags

      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;
      Returns:
      The flags.
    • getTraceId

      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;
      Returns:
      The traceId.
    • getSpanId

      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;
      Returns:
      The spanId.