From a42ed8ee4810510f2caa4c0cf0c7cb0595341df2 Mon Sep 17 00:00:00 2001 From: "taekyu.kang" Date: Thu, 23 May 2024 14:50:56 +0900 Subject: [PATCH] trivial. add debug log --- internal/usecase/dashboard.go | 2 ++ pkg/thanos-client/client.go | 1 + 2 files changed, 3 insertions(+) diff --git a/internal/usecase/dashboard.go b/internal/usecase/dashboard.go index a47f3fae..504afe6f 100644 --- a/internal/usecase/dashboard.go +++ b/internal/usecase/dashboard.go @@ -832,6 +832,8 @@ func (u *DashboardUsecase) GetPolicyViolation(ctx context.Context, organizationI return nil, err } + log.Info(ctx, helper.ModelToJson(pm)) + // totalViolation: {"K8sRequiredLabels": {"violation_enforcement": 2}} totalViolation := make(map[string]map[string]int) diff --git a/pkg/thanos-client/client.go b/pkg/thanos-client/client.go index 4dcf93e5..ab017bbd 100644 --- a/pkg/thanos-client/client.go +++ b/pkg/thanos-client/client.go @@ -189,6 +189,7 @@ func (c *ThanosClientImpl) fetchRange(ctx context.Context, query string, start i query = url.QueryEscape(query) + rangeParam requestUrl := c.url + "/api/v1/query_range?query=" + query + log.Info(ctx, requestUrl) res, err := c.client.Get(requestUrl) if err != nil { return nil, err