Class Span


  • @Generated(value="OracleSDKGenerator",
               comments="API Version: 20200630")
    public final class Span
    extends com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
    Definition of a span object.
    Note: Objects should always be created or deserialized using the Span.Builder. This model distinguishes fields that are null because they are unset from fields that are explicitly set to null. This is done in the setter methods of the Span.Builder, which maintain a set of all explicitly set fields called Span.Builder.__explicitlySet__. The hashCode() and equals(Object) methods are implemented to take the explicitly set fields into account. The constructor, on the other hand, does not take the explicitly set fields into account (since the constructor cannot distinguish explicit null from unset null).
    • Method Detail

      • builder

        public static Span.Builder builder()
        Create a new builder.
      • getKey

        public String getKey()
        Unique identifier (spanId) for the span.

        Note that this field is defined as spanKey in the API and it maps to the spanId in the trace data in Application Performance Monitoring.

        Returns:
        the value
      • getParentSpanKey

        public String getParentSpanKey()
        Unique parent identifier for the span if one exists.

        For root spans this will be null.

        Returns:
        the value
      • getTraceKey

        public String getTraceKey()
        Unique identifier for the trace.
        Returns:
        the value
      • getTimeStarted

        public Date getTimeStarted()
        Span start time.

        Timestamp when the span was started.

        Returns:
        the value
      • getTimeEnded

        public Date getTimeEnded()
        Span end time.

        Timestamp when the span was completed.

        Returns:
        the value
      • getDurationInMs

        public Long getDurationInMs()
        Total span duration in milliseconds.
        Returns:
        the value
      • getOperationName

        public String getOperationName()
        Span name associated with the trace.

        This is usually the method or URI of the request.

        Returns:
        the value
      • getServiceName

        public String getServiceName()
        Service name associated with the span.
        Returns:
        the value
      • getKind

        public String getKind()
        Kind associated with the span.
        Returns:
        the value
      • getTags

        public List<Tag> getTags()
        List of tags associated with the span.
        Returns:
        the value
      • getTagsMetadata

        public Map<String,​TagMetadata> getTagsMetadata()
        Metadata about the tags in the span.
        Returns:
        the value
      • getLogs

        public List<SpanLogCollection> getLogs()
        List of logs associated with the span.
        Returns:
        the value
      • getIsError

        public Boolean getIsError()
        Indicates if the span has an error.
        Returns:
        the value
      • getSourceName

        public Span.SourceName getSourceName()
        Source of span (spans, syn_spans).
        Returns:
        the value
      • toString

        public String toString()
        Overrides:
        toString in class com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
      • toString

        public String toString​(boolean includeByteArrayContents)
        Return a string representation of the object.
        Parameters:
        includeByteArrayContents - true to include the full contents of byte arrays
        Returns:
        string representation
      • equals

        public boolean equals​(Object o)
        Overrides:
        equals in class com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel