tempohandler

package
v0.12.2 Latest Latest
Warning

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

Go to latest
Published: May 30, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Overview

Package tempohandler provides Tempo API implementation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TempoAPI

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

TempoAPI implements tempoapi.Handler.

func NewTempoAPI

func NewTempoAPI(
	q tracestorage.Querier,
	engine *traceqlengine.Engine,
	opts TempoAPIOptions,
) *TempoAPI

NewTempoAPI creates new TempoAPI.

func (*TempoAPI) BuildInfo added in v0.12.2

func (h *TempoAPI) BuildInfo(ctx context.Context) (*tempoapi.PrometheusVersion, error)

BuildInfo implements buildInfo operation.

Returns Tempo buildinfo, in the same format as Prometheus `/api/v1/status/buildinfo`. Used by Grafana to check Tempo API version.

GET /api/status/buildinfo

func (*TempoAPI) Echo

func (h *TempoAPI) Echo(_ context.Context) (tempoapi.EchoOK, error)

Echo request for testing, issued by Grafana.

GET /api/echo

func (*TempoAPI) NewError

func (h *TempoAPI) NewError(_ context.Context, err error) *tempoapi.ErrorStatusCode

NewError creates *ErrorStatusCode from error returned by handler.

Used for common default response.

func (*TempoAPI) Search

func (h *TempoAPI) Search(ctx context.Context, params tempoapi.SearchParams) (resp *tempoapi.Traces, _ error)

Search implements search operation. Execute TraceQL query.

GET /api/search

func (*TempoAPI) SearchTagValues

func (h *TempoAPI) SearchTagValues(ctx context.Context, params tempoapi.SearchTagValuesParams) (resp *tempoapi.TagValues, _ error)

SearchTagValues implements search_tag_values operation.

This endpoint retrieves all discovered values for the given tag, which can be used in search.

GET /api/search/tag/{tag_name}/values

func (*TempoAPI) SearchTagValuesV2

func (h *TempoAPI) SearchTagValuesV2(ctx context.Context, params tempoapi.SearchTagValuesV2Params) (resp *tempoapi.TagValuesV2, _ error)

SearchTagValuesV2 implements search_tag_values_v2 operation.

This endpoint retrieves all discovered values and their data types for the given TraceQL identifier.

GET /api/v2/search/tag/{attribute_selector}/values

func (*TempoAPI) SearchTags

func (h *TempoAPI) SearchTags(ctx context.Context, params tempoapi.SearchTagsParams) (resp *tempoapi.TagNames, _ error)

SearchTags implements search_tags operation.

This endpoint retrieves all discovered tag names that can be used in search.

GET /api/search/tags

func (*TempoAPI) SearchTagsV2 added in v0.12.0

func (h *TempoAPI) SearchTagsV2(ctx context.Context, params tempoapi.SearchTagsV2Params) (*tempoapi.TagNamesV2, error)

SearchTagsV2 implements searchTagsV2 operation.

This endpoint retrieves all discovered tag names that can be used in search.

GET /api/v2/search/tags

func (*TempoAPI) TraceByID

func (h *TempoAPI) TraceByID(ctx context.Context, params tempoapi.TraceByIDParams) (resp tempoapi.TraceByIDRes, _ error)

TraceByID implements traceByID operation.

Querying traces by id.

GET /api/traces/{traceID}

type TempoAPIOptions added in v0.12.0

type TempoAPIOptions struct {
	// EnableAutocompleteQuery whether if handler should parse
	// the `q` parameter in tag requests
	//
	// See https://grafana.com/docs/tempo/latest/api_docs/#filtered-tag-values.
	EnableAutocompleteQuery bool
}

TempoAPIOptions describes TempoAPI options.

Jump to

Keyboard shortcuts

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