submit injects the tenant org ID into the outgoing gRPC metadata and calls SubmitRedaction.
(ctx context.Context, c tempopb.BackendSchedulerClient, traceIDs [][]byte)
| 57 | |
| 58 | // submit injects the tenant org ID into the outgoing gRPC metadata and calls SubmitRedaction. |
| 59 | func (cmd *redactCmd) submit(ctx context.Context, c tempopb.BackendSchedulerClient, traceIDs [][]byte) (*tempopb.SubmitRedactionResponse, error) { |
| 60 | ctx = user.InjectOrgID(ctx, cmd.TenantID) |
| 61 | ctx, err := user.InjectIntoGRPCRequest(ctx) |
| 62 | if err != nil { |
| 63 | return nil, fmt.Errorf("injecting tenant ID into gRPC request: %w", err) |
| 64 | } |
| 65 | |
| 66 | resp, err := c.SubmitRedaction(ctx, &tempopb.SubmitRedactionRequest{ |
| 67 | TenantId: cmd.TenantID, |
| 68 | TraceIds: traceIDs, |
| 69 | }) |
| 70 | if err != nil { |
| 71 | return nil, fmt.Errorf("submitting redaction: %w", err) |
| 72 | } |
| 73 | return resp, nil |
| 74 | } |
| 75 | |
| 76 | func (cmd *redactCmd) buildTransportCredentials() (credentials.TransportCredentials, error) { |
| 77 | if !cmd.TLS { |