Skip to content

Commit 9e55c66

Browse files
committed
RHINENG-16026: tweak Kessel logs
Updated the duration from ns to ms for readability, update the label to 'durationMs', omit unnecessary list of workspaces, and omit unnecessary final OK log.
1 parent 7f4cc7b commit 9e55c66

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

manager/middlewares/kessel.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -83,17 +83,17 @@ func useStreamedListObjects(
8383
) {
8484
if err != nil {
8585
utils.LogError(
86-
"err", err.Error(), "receivingDuration", time.Since(start), "permission", permission, "received_count",
87-
len(workspaces), "failed to useStreamedListObjects",
86+
"err", err.Error(), "durationMs", time.Since(start).Milliseconds(), "permission", permission,
87+
"received_count", len(workspaces), "failed to useStreamedListObjects",
8888
)
8989
return nil, err
9090
}
9191
workspaces = append(workspaces, res)
9292
}
9393

9494
utils.LogDebug(
95-
"workspaces", workspaces, "receivingDuration", time.Since(start), "permission", permission, "received_count",
96-
len(workspaces), "retrieved workspaces",
95+
"durationMs", time.Since(start).Milliseconds(), "permission", permission, "received_count", len(workspaces),
96+
"retrieved workspaces",
9797
)
9898
return workspaces, nil
9999
}
@@ -136,7 +136,6 @@ func hasPermissionKessel(c *gin.Context) {
136136
return
137137
}
138138
c.Set(utils.KeyInventoryGroups, inventoryGroups)
139-
utils.LogDebug("Kessel check OK")
140139
}
141140

142141
func Kessel() gin.HandlerFunc {

0 commit comments

Comments
 (0)