Documentation ¶
Overview ¶
Package tempohandler provides Tempo API implementation.
Index ¶
- type TempoAPI
- func (h *TempoAPI) BuildInfo(ctx context.Context) (*tempoapi.PrometheusVersion, error)
- func (h *TempoAPI) Echo(_ context.Context) (tempoapi.EchoOK, error)
- func (h *TempoAPI) NewError(_ context.Context, err error) *tempoapi.ErrorStatusCode
- func (h *TempoAPI) Search(ctx context.Context, params tempoapi.SearchParams) (resp *tempoapi.Traces, _ error)
- func (h *TempoAPI) SearchTagValues(ctx context.Context, params tempoapi.SearchTagValuesParams) (resp *tempoapi.TagValues, _ error)
- func (h *TempoAPI) SearchTagValuesV2(ctx context.Context, params tempoapi.SearchTagValuesV2Params) (resp *tempoapi.TagValuesV2, _ error)
- func (h *TempoAPI) SearchTags(ctx context.Context, params tempoapi.SearchTagsParams) (resp *tempoapi.TagNames, _ error)
- func (h *TempoAPI) SearchTagsV2(ctx context.Context, params tempoapi.SearchTagsV2Params) (*tempoapi.TagNamesV2, error)
- func (h *TempoAPI) TraceByID(ctx context.Context, params tempoapi.TraceByIDParams) (resp tempoapi.TraceByIDRes, _ error)
- type TempoAPIOptions
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
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) NewError ¶
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.