ConsumeTraces converts OTLP traces to Jaeger format and sends them via gRPC
(ctx context.Context, traces ptrace.Traces)
| 242 | |
| 243 | // ConsumeTraces converts OTLP traces to Jaeger format and sends them via gRPC |
| 244 | func (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 |
| 260 | func (e *JaegerGRPCExporter) Capabilities() consumer.Capabilities { |
no outgoing calls