File tree 3 files changed +5
-3
lines changed
3 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -368,7 +368,7 @@ func (ds *ServerImpl) setupFlow(
368
368
}
369
369
370
370
if ! f .IsLocal () {
371
- flowCtx .AmbientContext .AddLogTag ("f" , flowCtx .ID .Short ())
371
+ flowCtx .AmbientContext .AddLogTag ("f" , redact . SafeString ( flowCtx .ID .Short () ))
372
372
if req .JobTag != "" {
373
373
flowCtx .AmbientContext .AddLogTag ("job" , req .JobTag )
374
374
}
Original file line number Diff line number Diff line change @@ -54,6 +54,7 @@ import (
54
54
"github.com/cockroachdb/cockroach/pkg/util/tracing"
55
55
"github.com/cockroachdb/errors"
56
56
"github.com/cockroachdb/logtags"
57
+ "github.com/cockroachdb/redact"
57
58
)
58
59
59
60
var settingDistSQLNumRunners = settings .RegisterIntSetting (
@@ -420,7 +421,7 @@ func (dsp *DistSQLPlanner) setupFlows(
420
421
// In distributed plans populate some extra state.
421
422
setupReq .EvalContext = execinfrapb .MakeEvalContext (& evalCtx .Context )
422
423
if jobTag , ok := logtags .FromContext (ctx ).GetTag ("job" ); ok {
423
- setupReq .JobTag = jobTag .ValueStr ()
424
+ setupReq .JobTag = redact . SafeString ( jobTag .ValueStr () )
424
425
}
425
426
}
426
427
if evalCtx .SessionData ().PropagateAdmissionHeaderToLeafTransactions && localState .Txn != nil {
Original file line number Diff line number Diff line change @@ -27,7 +27,8 @@ message SetupFlowRequest {
27
27
28
28
optional util.tracing.tracingpb.TraceInfo trace_info = 11 ;
29
29
// JobTag is only populated in distributed flows.
30
- optional string job_tag = 13 [(gogoproto.nullable ) = false ];
30
+ optional string job_tag = 13 [(gogoproto.nullable ) = false ,
31
+ (gogoproto.casttype ) = "github.com/cockroachdb/redact.SafeString" ];
31
32
32
33
// LeafTxnInputState is the input parameter for the *kv.Txn needed for
33
34
// executing the flow.
You can’t perform that action at this time.
0 commit comments