Skip to content

Commit 80087ff

Browse files
Arta AsadiArta Asadi
authored andcommitted
fix: add more logs
1 parent f140f68 commit 80087ff

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

discovery/task/run-task.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ type Integration struct {
8989
}
9090

9191
func (tr *TaskRunner) RunTask(ctx context.Context) error {
92+
tr.logger.Info("Run task")
9293

9394
taskResult := &TaskResult{}
9495
var err error
@@ -111,6 +112,8 @@ func (tr *TaskRunner) RunTask(ctx context.Context) error {
111112
taskResult.AllIntegrationsCount = len(integrations)
112113
taskResult.ProgressedIntegrations = make(map[string]*IntegrationResult)
113114

115+
tr.logger.Info("Describing integrations", zap.Any("integrations", integrations))
116+
114117
for _, i := range integrations {
115118
err = tr.describeIntegrationResourceTypes(ctx, i, taskResult)
116119
if err != nil {
@@ -154,6 +157,8 @@ func (tr *TaskRunner) describeIntegrationResourceTypes(ctx context.Context, i In
154157
}
155158
}
156159

160+
tr.logger.Info("Describing integration", zap.String("integration_id", i.IntegrationID), zap.Any("resource_types", resourceTypes))
161+
157162
for _, rt := range resourceTypes {
158163
taskResult.ProgressedIntegrations[i.IntegrationID].AllResourceTypes = append(taskResult.ProgressedIntegrations[i.IntegrationID].AllResourceTypes, rt.Name)
159164
}
@@ -211,6 +216,7 @@ func (tr *TaskRunner) describeIntegrationResourceTypes(ctx context.Context, i In
211216
tr.logger.Error("failed to publish initial InProgress job status", zap.String("response", string(responseJson)), zap.Error(err))
212217
return err
213218
}
219+
tr.logger.Info("describing resource type finished", zap.String("integration_id", i.IntegrationID), zap.String("resource_type", rt.Name))
214220
}
215221

216222
return nil

0 commit comments

Comments
 (0)