Package com.amazonaws.xray.entities
Class TraceID
java.lang.Object
com.amazonaws.xray.entities.TraceID
-
Constructor Summary
ConstructorsConstructorDescriptionTraceID()
Deprecated.TraceID
(long startTime) Deprecated.Usecreate()
orcreate(AWSXRayRecorder)
-
Method Summary
Modifier and TypeMethodDescriptionstatic TraceID
create()
Returns a newTraceID
which represents the start of a new trace.static TraceID
create
(AWSXRayRecorder creator) Returns a newTraceID
which represents the start of a new trace.boolean
static TraceID
fromString
(String xrayTraceId) Deprecated.usegetNumberAsHex()
.Returns the number component of thisTraceID
as a hexadecimal string.long
Deprecated.UsegetStartTimeAsHex()
.Returns the start time of thisTraceID
as a hexadecimal string representing the number of seconds since the epoch.int
hashCode()
static TraceID
invalid()
Returns an invalidTraceID
which can be used when an ID is needed outside the context of a trace, for example for an unsampled segment.void
setNumber
(@Nullable BigInteger number) Deprecated.TraceID is effectively immutable and this will be removedvoid
setStartTime
(long startTime) Deprecated.TraceID is effectively immutable and this will be removedtoString()
-
Constructor Details
-
TraceID
Deprecated.Usecreate()
orcreate(AWSXRayRecorder)
-
TraceID
Deprecated.Usecreate()
orcreate(AWSXRayRecorder)
-
-
Method Details
-
create
Returns a newTraceID
which represents the start of a new trace. This new ID is generated according to the settings provided by the global AWSXRayRecorder instance returned byAWSXRay.getGlobalRecorder()
.- See Also:
-
create
Returns a newTraceID
which represents the start of a new trace. This new ID is generated according to the settings provided by the AWSXRayRecorder instance that created it. -
fromString
-
invalid
Returns an invalidTraceID
which can be used when an ID is needed outside the context of a trace, for example for an unsampled segment. -
toString
-
getNumber
Deprecated.usegetNumberAsHex()
.- Returns:
- the number
-
getNumberAsHex
Returns the number component of thisTraceID
as a hexadecimal string. -
setNumber
Deprecated.TraceID is effectively immutable and this will be removed- Parameters:
number
- the number to set
-
getStartTime
public long getStartTime()Deprecated.UsegetStartTimeAsHex()
.- Returns:
- the startTime
-
getStartTimeAsHex
Returns the start time of thisTraceID
as a hexadecimal string representing the number of seconds since the epoch. -
setStartTime
Deprecated.TraceID is effectively immutable and this will be removed- Parameters:
startTime
- the startTime to set
-
hashCode
public int hashCode() -
equals
-
create()
orcreate(AWSXRayRecorder)