tempo

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 14, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const MaxSpssLimit = 100
View Source
const MaxTagNamesLimit = 500
View Source
const MaxTagValuesLimit = 1000
View Source
const MaxTraceLimit = 1000
View Source
const RequestTimeout = 30 * time.Second

Variables

This section is empty.

Functions

This section is empty.

Types

type Loader

type Loader interface {
	QueryV2(ctx context.Context, traceID string, opts QueryV2Options) (string, error)
	Search(ctx context.Context, opts SearchOptions) (string, error)
	SearchTagsV2(ctx context.Context, opts SearchTagsV2Options) (string, error)
	SearchTagValuesV2(ctx context.Context, tag string, opts SearchTagValuesV2Options) (string, error)
}

Loader defines the interface for querying Tempo

func NewTempoLoader

func NewTempoLoader(httpClient *http.Client, url string) Loader

type QueryV2Options

type QueryV2Options struct {
	Start int64 // Unix epoch seconds
	End   int64 // Unix epoch seconds
}

type RealLoader

type RealLoader struct {
	// contains filtered or unexported fields
}

RealLoader implements Loader using the Tempo HTTP API.

func (*RealLoader) QueryV2

func (r *RealLoader) QueryV2(ctx context.Context, traceID string, opts QueryV2Options) (string, error)

func (*RealLoader) Search

func (r *RealLoader) Search(ctx context.Context, opts SearchOptions) (string, error)

func (*RealLoader) SearchTagValuesV2

func (r *RealLoader) SearchTagValuesV2(ctx context.Context, tag string, opts SearchTagValuesV2Options) (string, error)

func (*RealLoader) SearchTagsV2

func (r *RealLoader) SearchTagsV2(ctx context.Context, opts SearchTagsV2Options) (string, error)

type SearchOptions

type SearchOptions struct {
	Query string // TraceQL query
	Limit int    // Maximum search results (default: 20)
	Start int64  // Unix epoch seconds
	End   int64  // Unix epoch seconds
	Spss  int    // Spans per span-set limit (default: 3)
}

type SearchTagValuesV2Options

type SearchTagValuesV2Options struct {
	Query          string // TraceQL query for filtering tag values
	Start          int64  // Unix epoch seconds
	End            int64  // Unix epoch seconds
	Limit          int    // Maximum number of tag values to return
	MaxStaleValues int    // Search termination threshold for stale values
}

type SearchTagsV2Options

type SearchTagsV2Options struct {
	Scope          string // resource, span, intrinsic, event, link, or instrumentation
	Query          string // TraceQL query for filtering tag names
	Start          int64  // Unix epoch seconds
	End            int64  // Unix epoch seconds
	Limit          int    // Maximum number of tag names per scope
	MaxStaleValues int    // Search termination threshold for stale values
}

type TempoClient

type TempoClient struct {
	// contains filtered or unexported fields
}

func NewTempoClient

func NewTempoClient(httpClient *http.Client, url string) *TempoClient

func (*TempoClient) QueryV2

func (c *TempoClient) QueryV2(ctx context.Context, traceID string, opts QueryV2Options) (string, error)

func (*TempoClient) Search

func (c *TempoClient) Search(ctx context.Context, opts SearchOptions) (string, error)

func (*TempoClient) SearchTagValuesV2

func (c *TempoClient) SearchTagValuesV2(ctx context.Context, tag string, opts SearchTagValuesV2Options) (string, error)

func (*TempoClient) SearchTagsV2

func (c *TempoClient) SearchTagsV2(ctx context.Context, opts SearchTagsV2Options) (string, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL