From c132f04f230e21ada54a686e1f86ed849193e15e Mon Sep 17 00:00:00 2001 From: Christian Weichel Date: Fri, 11 Feb 2022 15:42:43 +0000 Subject: [PATCH] [ws-manager] Add start request debug log --- components/ws-manager/pkg/manager/manager.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/components/ws-manager/pkg/manager/manager.go b/components/ws-manager/pkg/manager/manager.go index 9bb42841bce70f..aacf827712d334 100644 --- a/components/ws-manager/pkg/manager/manager.go +++ b/components/ws-manager/pkg/manager/manager.go @@ -21,6 +21,7 @@ import ( "google.golang.org/grpc/credentials" "google.golang.org/grpc/peer" "google.golang.org/grpc/status" + "google.golang.org/protobuf/encoding/protojson" corev1 "k8s.io/api/core/v1" k8serr "k8s.io/apimachinery/pkg/api/errors" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -142,6 +143,10 @@ func (m *Manager) StartWorkspace(ctx context.Context, req *api.StartWorkspaceReq tracing.ApplyOWI(span, owi) defer tracing.FinishSpan(span, &err) + reqs, _ := protojson.Marshal(req) + safeReqs, _ := log.RedactJSON(reqs) + log.WithField("req", string(safeReqs)).Debug("StartWorkspace request received") + // Make sure the objects we're about to create do not exist already switch req.Type { case api.WorkspaceType_IMAGEBUILD: