Interface SpanStore
-
- All Known Implementing Classes:
InMemoryStorage
public interface SpanStore
Queries data derived fromSpanConsumer
.Note: This is not considered a user-level Api, rather an Spi that can be used to bind user-level abstractions such as futures or observables.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description Call<List<DependencyLink>>
getDependencies(long endTs, long lookback)
Returns dependency links derived from spans in an interval contained by (endTs - lookback) or empty if none are found.Call<List<String>>
getServiceNames()
Deprecated.Call<List<String>>
getSpanNames(String serviceName)
Deprecated.Call<List<Span>>
getTrace(String traceId)
Deprecated.Call<List<List<Span>>>
getTraces(QueryRequest request)
Retrieves spans grouped by trace ID from the storage system with no ordering expectation.
-
-
-
Method Detail
-
getTraces
Call<List<List<Span>>> getTraces(QueryRequest request)
Retrieves spans grouped by trace ID from the storage system with no ordering expectation.When strict trace ID is disabled, spans are grouped by the right-most 16 characters of the trace ID.
-
getTrace
@Deprecated Call<List<Span>> getTrace(String traceId)
Deprecated.Retrieves spans that share a 128-bit trace id with no ordering expectation or empty if none are found.When strict trace ID is disabled, spans with the same right-most 16 characters are returned even if the characters to the left are not.
Implementations should use
Span.normalizeTraceId(String)
to ensure consistency.- Parameters:
traceId
- thetrace ID
-
getServiceNames
@Deprecated Call<List<String>> getServiceNames()
Deprecated.
-
getSpanNames
@Deprecated Call<List<String>> getSpanNames(String serviceName)
Deprecated.Retrieves allspan names
recorded by aservice
, sorted lexicographically.
-
getDependencies
Call<List<DependencyLink>> getDependencies(long endTs, long lookback)
Returns dependency links derived from spans in an interval contained by (endTs - lookback) or empty if none are found.Implementations may bucket aggregated data, for example daily. When this is the case, endTs may be floored to align with that bucket, for example midnight if daily. lookback applies to the original endTs, even when bucketed. Using the daily example, if endTs was 11pm and lookback was 25 hours, the implementation would query against 2 buckets.
Some implementations parse spans from storage and call
DependencyLinker
to aggregate links. The reason is certain graph logic, such as skipping up the tree is difficult to implement as a storage query.Spans are grouped by the right-most 16 characters of the trace ID. This ensures call counts are not incremented twice due to one hop downgrading from 128 to 64-bit trace IDs.
- Parameters:
endTs
- only return links from spans whereSpan.timestamp()
are at or before this time in epoch milliseconds.lookback
- only return links from spans whereSpan.timestamp()
are at or after (endTs - lookback) in milliseconds.
-
-