Class TraceSpan

java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.devtools.cloudtrace.v1.TraceSpan
All Implemented Interfaces:
TraceSpanOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

@Generated public final class TraceSpan extends com.google.protobuf.GeneratedMessage implements TraceSpanOrBuilder
 A span represents a single timed event within a trace. Spans can be nested
 and form a trace tree. Often, a trace contains a root span that describes the
 end-to-end latency of an operation and, optionally, one or more subspans for
 its suboperations. Spans do not need to be contiguous. There may be gaps
 between spans in a trace.
 
Protobuf type google.devtools.cloudtrace.v1.TraceSpan
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    A span represents a single timed event within a trace.
    static enum 
    Type of span.

    Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessage

    com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.FieldAccessorTable, com.google.protobuf.GeneratedMessage.GeneratedExtension<ContainingT extends com.google.protobuf.Message,T extends Object>, com.google.protobuf.GeneratedMessage.UnusedPrivateParameter

    Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessage

    com.google.protobuf.AbstractMessage.BuilderParent

    Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite

    com.google.protobuf.AbstractMessageLite.InternalOneOfEnum
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     

    Fields inherited from class com.google.protobuf.GeneratedMessage

    alwaysUseFieldBuilders, loggedPre22TypeNames, unknownFields

    Fields inherited from class com.google.protobuf.AbstractMessage

    memoizedSize

    Fields inherited from class com.google.protobuf.AbstractMessageLite

    memoizedHashCode
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Collection of labels associated with the span.
    boolean
     
    static TraceSpan
     
     
    static final com.google.protobuf.Descriptors.Descriptor
     
    com.google.protobuf.Timestamp
    End time of the span in nanoseconds from the UNIX epoch.
    com.google.protobuf.TimestampOrBuilder
    End time of the span in nanoseconds from the UNIX epoch.
    Distinguishes between spans generated in a particular context.
    int
    Distinguishes between spans generated in a particular context.
    Deprecated.
    int
    Collection of labels associated with the span.
    Collection of labels associated with the span.
    getLabelsOrDefault(String key, String defaultValue)
    Collection of labels associated with the span.
    Collection of labels associated with the span.
    Name of the span.
    com.google.protobuf.ByteString
    Name of the span.
    long
    Optional.
    com.google.protobuf.Parser<TraceSpan>
     
    int
     
    long
    Identifier for the span.
    com.google.protobuf.Timestamp
    Start time of the span in nanoseconds from the UNIX epoch.
    com.google.protobuf.TimestampOrBuilder
    Start time of the span in nanoseconds from the UNIX epoch.
    boolean
    End time of the span in nanoseconds from the UNIX epoch.
    int
     
    boolean
    Start time of the span in nanoseconds from the UNIX epoch.
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
     
    protected com.google.protobuf.MapFieldReflectionAccessor
     
    final boolean
     
     
    newBuilder(TraceSpan prototype)
     
     
    newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
     
    static TraceSpan
     
    static TraceSpan
    parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static TraceSpan
    parseFrom(byte[] data)
     
    static TraceSpan
    parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static TraceSpan
    parseFrom(com.google.protobuf.ByteString data)
     
    static TraceSpan
    parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static TraceSpan
    parseFrom(com.google.protobuf.CodedInputStream input)
     
    static TraceSpan
    parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static TraceSpan
     
    static TraceSpan
    parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static TraceSpan
     
    static TraceSpan
    parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static com.google.protobuf.Parser<TraceSpan>
     
     
    void
    writeTo(com.google.protobuf.CodedOutputStream output)
     

    Methods inherited from class com.google.protobuf.GeneratedMessage

    canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, newFileScopedGeneratedExtension, newInstance, newMessageScopedGeneratedExtension, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag

    Methods inherited from class com.google.protobuf.AbstractMessage

    findInitializationErrors, getInitializationErrorString, hashFields, toString

    Methods inherited from class com.google.protobuf.AbstractMessageLite

    addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.google.protobuf.MessageLite

    toByteArray, toByteString, writeDelimitedTo, writeTo

    Methods inherited from interface com.google.protobuf.MessageOrBuilder

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

  • Method Details

    • getDescriptor

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

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
      Overrides:
      internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessage
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage
    • getSpanId

      public long getSpanId()
       Identifier for the span. Must be a 64-bit integer other than 0 and
       unique within a trace. For example, `2205310701640571284`.
       
      fixed64 span_id = 1;
      Specified by:
      getSpanId in interface TraceSpanOrBuilder
      Returns:
      The spanId.
    • getKindValue

      public int getKindValue()
       Distinguishes between spans generated in a particular context. For example,
       two spans with the same name may be distinguished using `RPC_CLIENT`
       and `RPC_SERVER` to identify queueing latency associated with the span.
       
      .google.devtools.cloudtrace.v1.TraceSpan.SpanKind kind = 2;
      Specified by:
      getKindValue in interface TraceSpanOrBuilder
      Returns:
      The enum numeric value on the wire for kind.
    • getKind

      public TraceSpan.SpanKind getKind()
       Distinguishes between spans generated in a particular context. For example,
       two spans with the same name may be distinguished using `RPC_CLIENT`
       and `RPC_SERVER` to identify queueing latency associated with the span.
       
      .google.devtools.cloudtrace.v1.TraceSpan.SpanKind kind = 2;
      Specified by:
      getKind in interface TraceSpanOrBuilder
      Returns:
      The kind.
    • getName

      public String getName()
       Name of the span. Must be less than 128 bytes. The span name is sanitized
       and displayed in the Stackdriver Trace tool in the
       Google Cloud Platform Console.
       The name may be a method name or some other per-call site name.
       For the same executable and the same call point, a best practice is
       to use a consistent name, which makes it easier to correlate
       cross-trace spans.
       
      string name = 3;
      Specified by:
      getName in interface TraceSpanOrBuilder
      Returns:
      The name.
    • getNameBytes

      public com.google.protobuf.ByteString getNameBytes()
       Name of the span. Must be less than 128 bytes. The span name is sanitized
       and displayed in the Stackdriver Trace tool in the
       Google Cloud Platform Console.
       The name may be a method name or some other per-call site name.
       For the same executable and the same call point, a best practice is
       to use a consistent name, which makes it easier to correlate
       cross-trace spans.
       
      string name = 3;
      Specified by:
      getNameBytes in interface TraceSpanOrBuilder
      Returns:
      The bytes for name.
    • hasStartTime

      public boolean hasStartTime()
       Start time of the span in nanoseconds from the UNIX epoch.
       
      .google.protobuf.Timestamp start_time = 4;
      Specified by:
      hasStartTime in interface TraceSpanOrBuilder
      Returns:
      Whether the startTime field is set.
    • getStartTime

      public com.google.protobuf.Timestamp getStartTime()
       Start time of the span in nanoseconds from the UNIX epoch.
       
      .google.protobuf.Timestamp start_time = 4;
      Specified by:
      getStartTime in interface TraceSpanOrBuilder
      Returns:
      The startTime.
    • getStartTimeOrBuilder

      public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder()
       Start time of the span in nanoseconds from the UNIX epoch.
       
      .google.protobuf.Timestamp start_time = 4;
      Specified by:
      getStartTimeOrBuilder in interface TraceSpanOrBuilder
    • hasEndTime

      public boolean hasEndTime()
       End time of the span in nanoseconds from the UNIX epoch.
       
      .google.protobuf.Timestamp end_time = 5;
      Specified by:
      hasEndTime in interface TraceSpanOrBuilder
      Returns:
      Whether the endTime field is set.
    • getEndTime

      public com.google.protobuf.Timestamp getEndTime()
       End time of the span in nanoseconds from the UNIX epoch.
       
      .google.protobuf.Timestamp end_time = 5;
      Specified by:
      getEndTime in interface TraceSpanOrBuilder
      Returns:
      The endTime.
    • getEndTimeOrBuilder

      public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder()
       End time of the span in nanoseconds from the UNIX epoch.
       
      .google.protobuf.Timestamp end_time = 5;
      Specified by:
      getEndTimeOrBuilder in interface TraceSpanOrBuilder
    • getParentSpanId

      public long getParentSpanId()
       Optional. ID of the parent span, if any.
       
      fixed64 parent_span_id = 6 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getParentSpanId in interface TraceSpanOrBuilder
      Returns:
      The parentSpanId.
    • getLabelsCount

      public int getLabelsCount()
      Description copied from interface: TraceSpanOrBuilder
       Collection of labels associated with the span. Label keys must be less than
       128 bytes. Label values must be less than 16 kilobytes (10MB for
       `/stacktrace` values).
      
       Some predefined label keys exist, or you may create your own. When creating
       your own, we recommend the following formats:
      
       * `/category/product/key` for agents of well-known products (e.g.
       `/db/mongodb/read_size`).
       * `short_host/path/key` for domain-specific keys (e.g.
       `foo.com/myproduct/bar`)
      
       Predefined labels include:
      
       *   `/agent`
       *   `/component`
       *   `/error/message`
       *   `/error/name`
       *   `/http/client_city`
       *   `/http/client_country`
       *   `/http/client_protocol`
       *   `/http/client_region`
       *   `/http/host`
       *   `/http/method`
       *   `/http/path`
       *   `/http/redirected_url`
       *   `/http/request/size`
       *   `/http/response/size`
       *   `/http/route`
       *   `/http/status_code`
       *   `/http/url`
       *   `/http/user_agent`
       *   `/pid`
       *   `/stacktrace`
       *   `/tid`
       
      map<string, string> labels = 7;
      Specified by:
      getLabelsCount in interface TraceSpanOrBuilder
    • containsLabels

      public boolean containsLabels(String key)
       Collection of labels associated with the span. Label keys must be less than
       128 bytes. Label values must be less than 16 kilobytes (10MB for
       `/stacktrace` values).
      
       Some predefined label keys exist, or you may create your own. When creating
       your own, we recommend the following formats:
      
       * `/category/product/key` for agents of well-known products (e.g.
       `/db/mongodb/read_size`).
       * `short_host/path/key` for domain-specific keys (e.g.
       `foo.com/myproduct/bar`)
      
       Predefined labels include:
      
       *   `/agent`
       *   `/component`
       *   `/error/message`
       *   `/error/name`
       *   `/http/client_city`
       *   `/http/client_country`
       *   `/http/client_protocol`
       *   `/http/client_region`
       *   `/http/host`
       *   `/http/method`
       *   `/http/path`
       *   `/http/redirected_url`
       *   `/http/request/size`
       *   `/http/response/size`
       *   `/http/route`
       *   `/http/status_code`
       *   `/http/url`
       *   `/http/user_agent`
       *   `/pid`
       *   `/stacktrace`
       *   `/tid`
       
      map<string, string> labels = 7;
      Specified by:
      containsLabels in interface TraceSpanOrBuilder
    • getLabels

      @Deprecated public Map<String,String> getLabels()
      Deprecated.
      Use getLabelsMap() instead.
      Specified by:
      getLabels in interface TraceSpanOrBuilder
    • getLabelsMap

      public Map<String,String> getLabelsMap()
       Collection of labels associated with the span. Label keys must be less than
       128 bytes. Label values must be less than 16 kilobytes (10MB for
       `/stacktrace` values).
      
       Some predefined label keys exist, or you may create your own. When creating
       your own, we recommend the following formats:
      
       * `/category/product/key` for agents of well-known products (e.g.
       `/db/mongodb/read_size`).
       * `short_host/path/key` for domain-specific keys (e.g.
       `foo.com/myproduct/bar`)
      
       Predefined labels include:
      
       *   `/agent`
       *   `/component`
       *   `/error/message`
       *   `/error/name`
       *   `/http/client_city`
       *   `/http/client_country`
       *   `/http/client_protocol`
       *   `/http/client_region`
       *   `/http/host`
       *   `/http/method`
       *   `/http/path`
       *   `/http/redirected_url`
       *   `/http/request/size`
       *   `/http/response/size`
       *   `/http/route`
       *   `/http/status_code`
       *   `/http/url`
       *   `/http/user_agent`
       *   `/pid`
       *   `/stacktrace`
       *   `/tid`
       
      map<string, string> labels = 7;
      Specified by:
      getLabelsMap in interface TraceSpanOrBuilder
    • getLabelsOrDefault

      public String getLabelsOrDefault(String key, String defaultValue)
       Collection of labels associated with the span. Label keys must be less than
       128 bytes. Label values must be less than 16 kilobytes (10MB for
       `/stacktrace` values).
      
       Some predefined label keys exist, or you may create your own. When creating
       your own, we recommend the following formats:
      
       * `/category/product/key` for agents of well-known products (e.g.
       `/db/mongodb/read_size`).
       * `short_host/path/key` for domain-specific keys (e.g.
       `foo.com/myproduct/bar`)
      
       Predefined labels include:
      
       *   `/agent`
       *   `/component`
       *   `/error/message`
       *   `/error/name`
       *   `/http/client_city`
       *   `/http/client_country`
       *   `/http/client_protocol`
       *   `/http/client_region`
       *   `/http/host`
       *   `/http/method`
       *   `/http/path`
       *   `/http/redirected_url`
       *   `/http/request/size`
       *   `/http/response/size`
       *   `/http/route`
       *   `/http/status_code`
       *   `/http/url`
       *   `/http/user_agent`
       *   `/pid`
       *   `/stacktrace`
       *   `/tid`
       
      map<string, string> labels = 7;
      Specified by:
      getLabelsOrDefault in interface TraceSpanOrBuilder
    • getLabelsOrThrow

      public String getLabelsOrThrow(String key)
       Collection of labels associated with the span. Label keys must be less than
       128 bytes. Label values must be less than 16 kilobytes (10MB for
       `/stacktrace` values).
      
       Some predefined label keys exist, or you may create your own. When creating
       your own, we recommend the following formats:
      
       * `/category/product/key` for agents of well-known products (e.g.
       `/db/mongodb/read_size`).
       * `short_host/path/key` for domain-specific keys (e.g.
       `foo.com/myproduct/bar`)
      
       Predefined labels include:
      
       *   `/agent`
       *   `/component`
       *   `/error/message`
       *   `/error/name`
       *   `/http/client_city`
       *   `/http/client_country`
       *   `/http/client_protocol`
       *   `/http/client_region`
       *   `/http/host`
       *   `/http/method`
       *   `/http/path`
       *   `/http/redirected_url`
       *   `/http/request/size`
       *   `/http/response/size`
       *   `/http/route`
       *   `/http/status_code`
       *   `/http/url`
       *   `/http/user_agent`
       *   `/pid`
       *   `/stacktrace`
       *   `/tid`
       
      map<string, string> labels = 7;
      Specified by:
      getLabelsOrThrow in interface TraceSpanOrBuilder
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessage
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessage
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static TraceSpan parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static TraceSpan parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static TraceSpan parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static TraceSpan parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static TraceSpan parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static TraceSpan parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static TraceSpan parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static TraceSpan parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static TraceSpan parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static TraceSpan parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static TraceSpan parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static TraceSpan parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      public TraceSpan.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static TraceSpan.Builder newBuilder()
    • newBuilder

      public static TraceSpan.Builder newBuilder(TraceSpan prototype)
    • toBuilder

      public TraceSpan.Builder toBuilder()
      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected TraceSpan.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
      Overrides:
      newBuilderForType in class com.google.protobuf.AbstractMessage
    • getDefaultInstance

      public static TraceSpan getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<TraceSpan> parser()
    • getParserForType

      public com.google.protobuf.Parser<TraceSpan> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessage
    • getDefaultInstanceForType

      public TraceSpan getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder