Interface SpanStore

  • All Known Implementing Classes:
    InMemoryStorage

    public interface SpanStore
    Queries data derived from 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.

    • Method Detail

      • getTraces

        Call<java.util.List<java.util.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<java.util.List<Span>> getTrace​(java.lang.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 - the trace ID
      • getDependencies

        Call<java.util.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 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.