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

Method add

modules/frontend/v1/request_batch.go:37–52  ·  view source on GitHub ↗
(r *request)

Source from the content-addressed store, hash-verified

35}
36
37func (b *requestBatch) add(r *request) error {
38 b.pipelineRequests = append(b.pipelineRequests, r)
39
40 req, err := httpgrpc.FromHTTPRequest(r.request.HTTPRequest())
41 if err != nil {
42 return err
43 }
44
45 // Propagate trace context in gRPC too - this will be ignored if using HTTP.
46 carrier := (*httpgrpcutil.HttpgrpcHeadersCarrier)(req)
47 otel.GetTextMapPropagator().Inject(r.OriginalContext(), carrier)
48
49 b.wireRequests = append(b.wireRequests, req)
50
51 return nil
52}
53
54func (b *requestBatch) httpGrpcRequests() []*httpgrpc.HTTPRequest {
55 return b.wireRequests

Callers 7

ProcessMethod · 0.95
TestRequestBatchBasicsFunction · 0.95
TestDoneChanClosesFunction · 0.95
TestDoneChanClosesOnStopFunction · 0.95

Calls 3

OriginalContextMethod · 0.80
HTTPRequestMethod · 0.65
InjectMethod · 0.45

Tested by 6

TestRequestBatchBasicsFunction · 0.76
TestDoneChanClosesFunction · 0.76
TestDoneChanClosesOnStopFunction · 0.76