(ctx context.Context, c JaegerClient)
| 119 | } |
| 120 | |
| 121 | func (t *TraceInfo) EmitBatches(ctx context.Context, c JaegerClient) error { |
| 122 | for i := int64(0); i < t.generateRandomInt(1, maxBatchesPerWrite); i++ { |
| 123 | ctx := user.InjectOrgID(ctx, t.tempoOrgID) |
| 124 | ctx, err := user.InjectIntoGRPCRequest(ctx) |
| 125 | if err != nil { |
| 126 | return fmt.Errorf("error injecting org id: %w", err) |
| 127 | } |
| 128 | |
| 129 | err = c.EmitBatch(ctx, t.makeThriftBatch(t.traceIDHigh, t.traceIDLow)) |
| 130 | if err != nil { |
| 131 | return fmt.Errorf("error pushing batch to Tempo: %w", err) |
| 132 | } |
| 133 | } |
| 134 | |
| 135 | return nil |
| 136 | } |
| 137 | |
| 138 | // EmitAllBatches sends all the batches that would normally be sent at some |
| 139 | // interval when using EmitBatches. |
no test coverage detected