public interface SpanStore
SpanConsumer.
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.
| Modifier and Type | Method and 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()
|
Call<List<String>> |
getSpanNames(String serviceName)
Retrieves all
span names recorded by a service, sorted lexicographically. |
Call<List<Span>> |
getTrace(String traceId)
Retrieves spans that share a 128-bit trace id with no ordering expectation or empty if none are
found.
|
Call<List<List<Span>>> |
getTraces(QueryRequest request)
Retrieves spans grouped by trace ID from the storage system with no ordering expectation.
|
Call<List<List<Span>>> getTraces(QueryRequest request)
When strict trace ID is disabled, spans are grouped by the right-most 16 characters of the trace ID.
Call<List<Span>> getTrace(String traceId)
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.
traceId - the trace IDCall<List<String>> getSpanNames(String serviceName)
span names recorded by a service, sorted lexicographically.Call<List<DependencyLink>> getDependencies(long endTs, long lookback)
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.
endTs - only return links from spans where Span.timestamp are at or before this
time in epoch milliseconds.lookback - only return links from spans where Span.timestamp are at or after
(endTs - lookback) in milliseconds.Copyright © 2015–2019 OpenZipkin. All rights reserved.