Package codes.grow.packages.tempo
Record Class SearchTrace
java.lang.Object
java.lang.Record
codes.grow.packages.tempo.SearchTrace
- Record Components:
traceId- 32 lower-case hex characters (Tempo trims leading zeros; the SDK pads them back)rootServiceName- service of the root span, if knownrootTraceName- name of the root span, if knownstartMicros- trace start in microseconds since the Unix epochdurationMicros- trace duration (Tempo reports whole milliseconds)spanSets- matching spansserviceStats- spans and errors per service
public record SearchTrace(String traceId, Optional<String> rootServiceName, Optional<String> rootTraceName, long startMicros, long durationMicros, List<SpanSet> spanSets, Map<String,ServiceStats> serviceStats)
extends Record
One trace found by
TempoQueryClient.search(SearchRequest).-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongReturns the value of thedurationMicrosrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of therootServiceNamerecord component.Returns the value of therootTraceNamerecord component.Returns the value of theserviceStatsrecord component.intTotal spans of the trace (sum ofserviceStatsspan counts).spanSets()Returns the value of thespanSetsrecord component.longReturns the value of thestartMicrosrecord component.final StringtoString()Returns a string representation of this record class.traceId()Returns the value of thetraceIdrecord component.
-
Constructor Details
-
SearchTrace
public SearchTrace(String traceId, Optional<String> rootServiceName, Optional<String> rootTraceName, long startMicros, long durationMicros, List<SpanSet> spanSets, Map<String, ServiceStats> serviceStats) Copies the collections.- Parameters:
traceId- trace idrootServiceName- root servicerootTraceName- root namestartMicros- startdurationMicros- durationspanSets- span setsserviceStats- service stats
-
-
Method Details
-
spanCount
public int spanCount()Total spans of the trace (sum ofserviceStatsspan counts).- Returns:
- span count
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
traceId
Returns the value of thetraceIdrecord component.- Returns:
- the value of the
traceIdrecord component
-
rootServiceName
Returns the value of therootServiceNamerecord component.- Returns:
- the value of the
rootServiceNamerecord component
-
rootTraceName
Returns the value of therootTraceNamerecord component.- Returns:
- the value of the
rootTraceNamerecord component
-
startMicros
public long startMicros()Returns the value of thestartMicrosrecord component.- Returns:
- the value of the
startMicrosrecord component
-
durationMicros
public long durationMicros()Returns the value of thedurationMicrosrecord component.- Returns:
- the value of the
durationMicrosrecord component
-
spanSets
Returns the value of thespanSetsrecord component.- Returns:
- the value of the
spanSetsrecord component
-
serviceStats
Returns the value of theserviceStatsrecord component.- Returns:
- the value of the
serviceStatsrecord component
-