public final class Span
extends com.google.api.client.json.GenericJson
This is the Java data model class that specifies how to parse/serialize into the JSON that is transmitted over HTTP when working with the Cloud Trace API. For a detailed explanation see: https://developers.google.com/api-client-library/java/google-http-java-client/json
com.google.api.client.util.GenericData.Flags
Constructor and Description |
---|
Span() |
Modifier and Type | Method and Description |
---|---|
Span |
clone() |
Attributes |
getAttributes()
A set of attributes on the span.
|
java.lang.Integer |
getChildSpanCount()
Optional.
|
TruncatableString |
getDisplayName()
Required.
|
java.lang.String |
getEndTime()
Required.
|
Links |
getLinks()
Links associated with the span.
|
java.lang.String |
getName()
The resource name of the span in the following format:
projects/[PROJECT_ID]/traces/[TRACE_ID]/spans/SPAN_ID is a unique identifier for a trace
within a project; it is a 32-character hexadecimal encoding of a 16-byte array.
|
java.lang.String |
getParentSpanId()
The [SPAN_ID] of this span's parent span.
|
java.lang.Boolean |
getSameProcessAsParentSpan()
Optional.
|
java.lang.String |
getSpanId()
Required.
|
java.lang.String |
getSpanKind()
Distinguishes between spans generated in a particular context.
|
StackTrace |
getStackTrace()
Stack trace captured at the start of the span.
|
java.lang.String |
getStartTime()
Required.
|
Status |
getStatus()
Optional.
|
TimeEvents |
getTimeEvents()
A set of time events.
|
Span |
set(java.lang.String fieldName,
java.lang.Object value) |
Span |
setAttributes(Attributes attributes)
A set of attributes on the span.
|
Span |
setChildSpanCount(java.lang.Integer childSpanCount)
Optional.
|
Span |
setDisplayName(TruncatableString displayName)
Required.
|
Span |
setEndTime(java.lang.String endTime)
Required.
|
Span |
setLinks(Links links)
Links associated with the span.
|
Span |
setName(java.lang.String name)
The resource name of the span in the following format:
projects/[PROJECT_ID]/traces/[TRACE_ID]/spans/SPAN_ID is a unique identifier for a trace
within a project; it is a 32-character hexadecimal encoding of a 16-byte array.
|
Span |
setParentSpanId(java.lang.String parentSpanId)
The [SPAN_ID] of this span's parent span.
|
Span |
setSameProcessAsParentSpan(java.lang.Boolean sameProcessAsParentSpan)
Optional.
|
Span |
setSpanId(java.lang.String spanId)
Required.
|
Span |
setSpanKind(java.lang.String spanKind)
Distinguishes between spans generated in a particular context.
|
Span |
setStackTrace(StackTrace stackTrace)
Stack trace captured at the start of the span.
|
Span |
setStartTime(java.lang.String startTime)
Required.
|
Span |
setStatus(Status status)
Optional.
|
Span |
setTimeEvents(TimeEvents timeEvents)
A set of time events.
|
getFactory, setFactory, toPrettyString, toString
entrySet, get, getClassInfo, getUnknownKeys, put, putAll, remove, setUnknownKeys
clear, containsKey, containsValue, equals, hashCode, isEmpty, keySet, size, values
public Attributes getAttributes()
null
for nonepublic Span setAttributes(Attributes attributes)
attributes
- attributes or null
for nonepublic java.lang.Integer getChildSpanCount()
null
for nonepublic Span setChildSpanCount(java.lang.Integer childSpanCount)
childSpanCount
- childSpanCount or null
for nonepublic TruncatableString getDisplayName()
null
for nonepublic Span setDisplayName(TruncatableString displayName)
displayName
- displayName or null
for nonepublic java.lang.String getEndTime()
null
for nonepublic Span setEndTime(java.lang.String endTime)
endTime
- endTime or null
for nonepublic Links getLinks()
null
for nonepublic Span setLinks(Links links)
links
- links or null
for nonepublic java.lang.String getName()
null
for nonepublic Span setName(java.lang.String name)
name
- name or null
for nonepublic java.lang.String getParentSpanId()
null
for nonepublic Span setParentSpanId(java.lang.String parentSpanId)
parentSpanId
- parentSpanId or null
for nonepublic java.lang.Boolean getSameProcessAsParentSpan()
null
for nonepublic Span setSameProcessAsParentSpan(java.lang.Boolean sameProcessAsParentSpan)
sameProcessAsParentSpan
- sameProcessAsParentSpan or null
for nonepublic java.lang.String getSpanId()
null
for nonepublic Span setSpanId(java.lang.String spanId)
spanId
- spanId or null
for nonepublic java.lang.String getSpanKind()
null
for nonepublic Span setSpanKind(java.lang.String spanKind)
spanKind
- spanKind or null
for nonepublic StackTrace getStackTrace()
null
for nonepublic Span setStackTrace(StackTrace stackTrace)
stackTrace
- stackTrace or null
for nonepublic java.lang.String getStartTime()
null
for nonepublic Span setStartTime(java.lang.String startTime)
startTime
- startTime or null
for nonepublic Status getStatus()
null
for nonepublic Span setStatus(Status status)
status
- status or null
for nonepublic TimeEvents getTimeEvents()
null
for nonepublic Span setTimeEvents(TimeEvents timeEvents)
timeEvents
- timeEvents or null
for nonepublic Span set(java.lang.String fieldName, java.lang.Object value)
set
in class com.google.api.client.json.GenericJson
public Span clone()
clone
in class com.google.api.client.json.GenericJson