Class InMemoryTraceQueryClient
java.lang.Object
codes.grow.packages.skywalking.testing.tracing.InMemoryTraceQueryClient
- All Implemented Interfaces:
TraceQueryClient
TraceQueryClient over in-memory spans (usually InMemorySpanExporter.spans()),
including a dependency graph computed from parent/child spans of different services.-
Constructor Summary
ConstructorsConstructorDescriptionInMemoryTraceQueryClient(InMemorySpanExporter exporter) Reads the spans of an exporter.InMemoryTraceQueryClient(Supplier<List<Span>> source) Reads normalized spans from a supplier. -
Method Summary
Modifier and TypeMethodDescriptiongetDependencies(Instant start, Instant end) Service dependency graph in a time range.Fetches one trace.listOperations(String service) Lists operations (span names) of a service.Lists services that reported spans.searchTraces(TraceSearchQuery query) Searches traces.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface codes.grow.packages.skywalking.tracing.query.TraceQueryClient
acceptsNativeIds, getDependenciesAsync, getTraceAsync, listOperationsAsync, listServicesAsync, searchTracesAsync, waitForTrace, waitForTrace, waitForTraceAsync
-
Constructor Details
-
InMemoryTraceQueryClient
Reads the spans of an exporter.- Parameters:
exporter- in-memory exporter
-
InMemoryTraceQueryClient
Reads normalized spans from a supplier.- Parameters:
source- current spans
-
-
Method Details
-
getTrace
Description copied from interface:TraceQueryClientFetches one trace.- Specified by:
getTracein interfaceTraceQueryClient- Parameters:
traceId- trace id (normalised withTraceIds.traceId(java.lang.String))- Returns:
- the trace, or empty when the service does not know it (yet)
-
searchTraces
Description copied from interface:TraceQueryClientSearches traces.- Specified by:
searchTracesin interfaceTraceQueryClient- Parameters:
query- filter- Returns:
- summaries
-
listServices
Description copied from interface:TraceQueryClientLists services that reported spans.- Specified by:
listServicesin interfaceTraceQueryClient- Returns:
- service names
-
listOperations
Description copied from interface:TraceQueryClientLists operations (span names) of a service.- Specified by:
listOperationsin interfaceTraceQueryClient- Parameters:
service- service name- Returns:
- operation names
-
getDependencies
Description copied from interface:TraceQueryClientService dependency graph in a time range.- Specified by:
getDependenciesin interfaceTraceQueryClient- Parameters:
start- range start ornullend- range end ornull- Returns:
- links
-