Documentation
¶
Index ¶
- func GetServiceDBGraphTimeRange(ctx context.Context, tenantID logstorage.TenantID, ...) ([][]logstorage.Field, error)
- func GetServiceGraphList(ctx context.Context, cp *tracecommon.CommonParams, ...) ([]*tracecommon.Row, error)
- func GetServiceGraphTimeRange(ctx context.Context, tenantID logstorage.TenantID, ...) ([][]logstorage.Field, error)
- func GetServiceNameList(ctx context.Context, cp *tracecommon.CommonParams) ([]string, error)
- func GetSpanNameList(ctx context.Context, cp *tracecommon.CommonParams, serviceName string) ([]string, error)
- func GetTrace(ctx context.Context, cp *tracecommon.CommonParams, traceID string) ([]*tracecommon.Row, error)
- func GetTraceList(ctx context.Context, cp *tracecommon.CommonParams, param *TraceQueryParam) ([]string, []*tracecommon.Row, error)
- type ServiceGraphQueryParameters
- type TraceQueryParam
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetServiceDBGraphTimeRange ¶ added in v0.8.1
func GetServiceDBGraphTimeRange(ctx context.Context, tenantID logstorage.TenantID, startTime, endTime time.Time, limit uint64) ([][]logstorage.Field, error)
GetServiceDBGraphTimeRange returns service-to-db relations (parent, child, callCount) for the given tenant and time range.
func GetServiceGraphList ¶ added in v0.4.0
func GetServiceGraphList(ctx context.Context, cp *tracecommon.CommonParams, param *ServiceGraphQueryParameters) ([]*tracecommon.Row, error)
GetServiceGraphList returns service dependencies graph edges (parent, child, callCount) in []*Row format.
TODO: currently this function can only handle request from Jaeger dependencies API. Since Tempo provides similar service graph feature, it would be great to add support for Tempo service graph API as well.
func GetServiceGraphTimeRange ¶ added in v0.4.0
func GetServiceGraphTimeRange(ctx context.Context, tenantID logstorage.TenantID, startTime, endTime time.Time, limit uint64) ([][]logstorage.Field, error)
GetServiceGraphTimeRange is an internal function used by service graph background task. It calculates the service graph relation within the time range in (parent, child, callCount) format for specific tenant.
func GetServiceNameList ¶
func GetServiceNameList(ctx context.Context, cp *tracecommon.CommonParams) ([]string, error)
GetServiceNameList returns all unique service names within *traceServiceAndSpanNameLookbehind window. todo: cache of recent result.
func GetSpanNameList ¶
func GetSpanNameList(ctx context.Context, cp *tracecommon.CommonParams, serviceName string) ([]string, error)
GetSpanNameList returns all unique span names for a service within *traceServiceAndSpanNameLookbehind window. todo: cache of recent result.
func GetTrace ¶
func GetTrace(ctx context.Context, cp *tracecommon.CommonParams, traceID string) ([]*tracecommon.Row, error)
GetTrace returns all spans of a trace in []*Row format. It searches in the index stream for start_time and end_time. If found: - search for span in time range [start_time, end_time].
func GetTraceList ¶
func GetTraceList(ctx context.Context, cp *tracecommon.CommonParams, param *TraceQueryParam) ([]string, []*tracecommon.Row, error)
GetTraceList returns multiple traceIDs and spans of them in []*Row format. It searches for traceIDs first, and then search for the spans of these traceIDs. To not miss any spans on the edge, it extends both the start time and end time by *traceMaxDurationWindow.
e.g.: 1. input time range: [00:00, 09:00] 2. found 20 trace id, and adjust time range to: [08:00, 09:00] 3. find spans on time range: [08:00-traceMaxDurationWindow, 09:00+traceMaxDurationWindow]