@@ -336,7 +336,7 @@ func (agent *Smith) Penalize(ws InfringingWorkspace) ([]config.PenaltyKind, erro
336
336
for _ , p := range penalty {
337
337
switch p {
338
338
case config .PenaltyStopWorkspace :
339
- log .WithField ("infringement" , ws .Infringements ).WithFields (owi ).Info ("stopping workspace" )
339
+ log .WithField ("infringement" , log. TrustedValueWrap { Value : ws .Infringements } ).WithFields (owi ).Info ("stopping workspace" )
340
340
agent .metrics .penaltyAttempts .WithLabelValues (string (p )).Inc ()
341
341
err := agent .stopWorkspace (ws .SupervisorPID , ws .InstanceID )
342
342
if err != nil {
@@ -345,7 +345,7 @@ func (agent *Smith) Penalize(ws InfringingWorkspace) ([]config.PenaltyKind, erro
345
345
}
346
346
return penalty , err
347
347
case config .PenaltyStopWorkspaceAndBlockUser :
348
- log .WithField ("infringement" , ws .Infringements ).WithFields (owi ).Info ("stopping workspace and blocking user" )
348
+ log .WithField ("infringement" , log. TrustedValueWrap { Value : ws .Infringements } ).WithFields (owi ).Info ("stopping workspace and blocking user" )
349
349
agent .metrics .penaltyAttempts .WithLabelValues (string (p )).Inc ()
350
350
err := agent .stopWorkspaceAndBlockUser (ws .SupervisorPID , ws .Owner , ws .WorkspaceID , ws .InstanceID )
351
351
if err != nil {
@@ -354,7 +354,7 @@ func (agent *Smith) Penalize(ws InfringingWorkspace) ([]config.PenaltyKind, erro
354
354
}
355
355
return penalty , err
356
356
case config .PenaltyLimitCPU :
357
- log .WithField ("infringement" , ws .Infringements ).WithFields (owi ).Info ("limiting CPU" )
357
+ log .WithField ("infringement" , log. TrustedValueWrap { Value : ws .Infringements } ).WithFields (owi ).Info ("limiting CPU" )
358
358
agent .metrics .penaltyAttempts .WithLabelValues (string (p )).Inc ()
359
359
err := agent .limitCPUUse (ws .Pod )
360
360
if err != nil {
0 commit comments