Package com.oracle.bmc.apmtraces.model
Class Span
- java.lang.Object
-
- com.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
-
- com.oracle.bmc.apmtraces.model.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 theSpan.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 theSpan.Builder
, which maintain a set of all explicitly set fields calledSpan.Builder.__explicitlySet__
. ThehashCode()
andequals(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).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Span.Builder
static class
Span.SourceName
Source of span (spans, syn_spans).
-
Constructor Summary
Constructors Constructor Description Span(String key, String parentSpanKey, String traceKey, Date timeStarted, Date timeEnded, Long durationInMs, String operationName, String serviceName, String kind, List<Tag> tags, Map<String,TagMetadata> tagsMetadata, List<SpanLogCollection> logs, Boolean isError, Span.SourceName sourceName)
Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Span.Builder
builder()
Create a new builder.boolean
equals(Object o)
Long
getDurationInMs()
Total span duration in milliseconds.Boolean
getIsError()
Indicates if the span has an error.String
getKey()
Unique identifier (spanId) for the span.String
getKind()
Kind associated with the span.List<SpanLogCollection>
getLogs()
List of logs associated with the span.String
getOperationName()
Span name associated with the trace.String
getParentSpanKey()
Unique parent identifier for the span if one exists.String
getServiceName()
Service name associated with the span.Span.SourceName
getSourceName()
Source of span (spans, syn_spans).List<Tag>
getTags()
List of tags associated with the span.Map<String,TagMetadata>
getTagsMetadata()
Metadata about the tags in the span.Date
getTimeEnded()
Span end time.Date
getTimeStarted()
Span start time.String
getTraceKey()
Unique identifier for the trace.int
hashCode()
Span.Builder
toBuilder()
String
toString()
String
toString(boolean includeByteArrayContents)
Return a string representation of the object.
-
-
-
Constructor Detail
-
Span
@Deprecated @ConstructorProperties({"key","parentSpanKey","traceKey","timeStarted","timeEnded","durationInMs","operationName","serviceName","kind","tags","tagsMetadata","logs","isError","sourceName"}) public Span(String key, String parentSpanKey, String traceKey, Date timeStarted, Date timeEnded, Long durationInMs, String operationName, String serviceName, String kind, List<Tag> tags, Map<String,TagMetadata> tagsMetadata, List<SpanLogCollection> logs, Boolean isError, Span.SourceName sourceName)
Deprecated.
-
-
Method Detail
-
builder
public static Span.Builder builder()
Create a new builder.
-
toBuilder
public Span.Builder toBuilder()
-
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
-
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 classcom.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 classcom.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classcom.oracle.bmc.http.client.internal.ExplicitlySetBmcModel
-
-