Skip to content
This repository was archived by the owner on Mar 24, 2025. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions internal/service/metrics/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,8 @@ func (s *service) update(ctx context.Context) error {
projectCtx := auth.WithProjectID(ctx, pid)
iter, err := s.cluster.ListCapsuleMetrics(projectCtx)
if err != nil {
return err
s.log.Info("failed to read metrics for project", zap.Stringer("project_id", pid), zap.Error(err))
continue
}

for {
Expand All @@ -143,12 +144,16 @@ func (s *service) update(ctx context.Context) error {
break
}
if err != nil {
return err
s.log.Info("failed to read metrics for project", zap.Stringer("project_id", pid), zap.Error(err))
break
}

if err := s.cr.CreateMetrics(projectCtx, cms); err != nil {
return err
s.log.Info("failed to write metrics for project", zap.Stringer("project_id", pid), zap.Error(err))
break
}

iter.Close()
}
}
return nil
Expand Down