MCPcopy
hub / github.com/grafana/tempo / ParseTraceID

Function ParseTraceID

pkg/api/http.go:134–147  ·  view source on GitHub ↗
(r *http.Request)

Source from the content-addressed store, hash-verified

132}
133
134func ParseTraceID(r *http.Request) ([]byte, error) {
135 vars := mux.Vars(r)
136 traceID, ok := vars[urlParamTraceID]
137 if !ok {
138 return nil, fmt.Errorf("please provide a traceID")
139 }
140
141 byteID, err := util.HexStringToTraceID(traceID)
142 if err != nil {
143 return nil, err
144 }
145
146 return byteID, nil
147}
148
149// ParseSearchRequest takes an http.Request and decodes query params to create a tempopb.SearchRequest
150func ParseSearchRequest(r *http.Request) (*tempopb.SearchRequest, error) {

Callers 4

newTraceIDHandlerFunction · 0.92
newTraceIDV2HandlerFunction · 0.92
TraceByIDHandlerMethod · 0.92
TraceByIDHandlerV2Method · 0.92

Calls 1

HexStringToTraceIDFunction · 0.92

Tested by

no test coverage detected