Skip to content

Add debug logs to task completer for task not started#6609

Merged
fimanishi merged 3 commits intocadence-workflow:masterfrom
fimanishi:add-debug-logs-to-task-completer
Jan 10, 2025
Merged

Add debug logs to task completer for task not started#6609
fimanishi merged 3 commits intocadence-workflow:masterfrom
fimanishi:add-debug-logs-to-task-completer

Conversation

@fimanishi
Copy link
Member

What changed?
Add debug logs for tasks that have not started in the task completer

Why?
Sanity check and debugging

How did you test it?
Will test in staging

Potential risks

Release notes

Documentation Changes

}

func isActivityTaskStarted(task *InternalTask, workflowExecutionResponse *types.DescribeWorkflowExecutionResponse) bool {
func isActivityTaskStarted(task *InternalTask, workflowExecutionResponse *types.DescribeWorkflowExecutionResponse, logger log.Logger) bool {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would consider swapping this to be a method rather than passing the log along if you need to do metrics/logging, ie making this func (tc *taskCompleterImpl) isActivityTaskStarted so that you can do things like dc.logger.debug(... and metrics

return true
}

logger.Debug(fmt.Sprintf("Activity task not started. TaskID: %v, ScheduleID: %v, PendingActivityState: %v",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prefer to not interpolate logs since they're hard to group. If you can add those values as tags?

@fimanishi fimanishi force-pushed the add-debug-logs-to-task-completer branch from f3ba36f to d7543cb Compare January 10, 2025 20:48
@fimanishi fimanishi merged commit d0601f1 into cadence-workflow:master Jan 10, 2025
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments