Skip to content

Commit

Permalink
Merge pull request #507 from openinfradev/add_debug
Browse files Browse the repository at this point in the history
trivial. add debug log
  • Loading branch information
ktkfree authored May 23, 2024
2 parents 892f96e + a42ed8e commit 886c7a5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/usecase/dashboard.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
1 change: 1 addition & 0 deletions pkg/thanos-client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 886c7a5

Please sign in to comment.