api

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2022 License: AGPL-3.0 Imports: 14 Imported by: 1

Documentation

Index

Constants

View Source
const (
	URLParamTraceID = "traceID"

	HeaderAccept         = "Accept"
	HeaderContentType    = "Content-Type"
	HeaderAcceptProtobuf = "application/protobuf"
	HeaderAcceptJSON     = "application/json"

	PathPrefixQuerier = "/querier"

	PathTraces          = "/api/traces/{traceID}"
	PathSearch          = "/api/search"
	PathSearchTags      = "/api/search/tags"
	PathSearchTagValues = "/api/search/tag/{tagName}/values"
	PathEcho            = "/api/echo"

	QueryModeKey       = "mode"
	QueryModeIngesters = "ingesters"
	QueryModeBlocks    = "blocks"
	QueryModeAll       = "all"
	BlockStartKey      = "blockStart"
	BlockEndKey        = "blockEnd"
)

Variables

This section is empty.

Functions

func AddServerlessParams added in v1.4.0

func AddServerlessParams(req *http.Request, maxBytes int) *http.Request

AddServerlessParams takes an already existing http.Request and adds maxBytes

to it

func BuildSearchBlockRequest added in v1.3.0

func BuildSearchBlockRequest(req *http.Request, searchReq *tempopb.SearchBlockRequest) (*http.Request, error)

BuildSearchBlockRequest takes a tempopb.SearchBlockRequest and populates the passed http.Request with the appropriate params. If no http.Request is provided a new one is created.

func BuildSearchRequest added in v1.3.0

func BuildSearchRequest(req *http.Request, searchReq *tempopb.SearchRequest) (*http.Request, error)

BuildSearchRequest takes a tempopb.SearchRequest and populates the passed http.Request with the appropriate params. If no http.Request is provided a new one is created.

func ExtractServerlessParams added in v1.4.0

func ExtractServerlessParams(req *http.Request) (int, error)

ExtractServerlessParams extracts params for the serverless functions from

an http.Request

func IsBackendSearch added in v1.3.0

func IsBackendSearch(r *http.Request) bool

IsBackendSearch returns true if the request has a start, end and tags parameter and is the /api/search path

func IsSearchBlock added in v1.3.0

func IsSearchBlock(r *http.Request) bool

IsSearchBlock returns true if the request appears to be for backend blocks. It is not exhaustive and only looks for blockID

func ParseSearchBlockRequest added in v1.3.0

func ParseSearchBlockRequest(r *http.Request) (*tempopb.SearchBlockRequest, error)

ParseBlockSearchRequest parses all http parameters necessary to perform a block search.

func ParseSearchRequest added in v1.3.0

func ParseSearchRequest(r *http.Request) (*tempopb.SearchRequest, error)

ParseSearchRequest takes an http.Request and decodes query params to create a tempopb.SearchRequest

func ParseTraceID

func ParseTraceID(r *http.Request) ([]byte, error)

func ValidateAndSanitizeRequest added in v1.4.0

func ValidateAndSanitizeRequest(r *http.Request) (string, string, string, int64, int64, error)

ValidateAndSanitizeRequest validates params for trace by id api return values are (blockStart, blockEnd, queryMode, start, end, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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