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

Method ConsumeTraces

integration/util/harness_api_writes.go:244–257  ·  integration/util/harness_api_writes.go::JaegerGRPCExporter.ConsumeTraces

ConsumeTraces converts OTLP traces to Jaeger format and sends them via gRPC

(ctx context.Context, traces ptrace.Traces)

Source from the content-addressed store, hash-verified

242
243// ConsumeTraces converts OTLP traces to Jaeger format and sends them via gRPC
244func (e *JaegerGRPCExporter) ConsumeTraces(ctx context.Context, traces ptrace.Traces) error {
245 batches := jaeger.ProtoFromTraces(traces)
246
247 for _, batch := range batches {
248 _, err := e.collector.PostSpans(ctx, &api_v2.PostSpansRequest{
249 Batch: *batch,
250 })
251 if err != nil {
252 return err
253 }
254 }
255
256 return nil
257}
258
259// Capabilities implements consumer.Traces
260func (e *JaegerGRPCExporter) Capabilities() consumer.Capabilities {

Callers 3

TestReceiversFunction · 0.45
WriteTempoProtoTracesMethod · 0.45
EmitBatchMethod · 0.45

Calls

no outgoing calls

Tested by 1

TestReceiversFunction · 0.36