Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add activity timeout context #6156

Conversation

3vilhamster
Copy link
Member

What changed?
I've introduced a new tag type and aded context on which timer caused activity timeout.

Why?
To improve observabitlity of activity timing out and investigating activity issues.

How did you test it?
Unit tests.

Potential risks

Release notes

Documentation Changes

Copy link

codecov bot commented Jul 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 72.65%. Comparing base (1a227c1) to head (f6ead5f).

Additional details and impacted files
Files Coverage Δ
service/history/task/timer_active_task_executor.go 72.58% <100.00%> (+0.05%) ⬆️

... and 5 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1a227c1...f6ead5f. Read the comment docs.

@@ -93,6 +94,11 @@ func WorkflowTimeoutType(timeoutType int64) Tag {
return newInt64("wf-timeout-type", timeoutType)
}

// ActivityTimeoutType returns tag for ActivityTimeoutType
func ActivityTimeoutType(timerType shared.TimeoutType) Tag {
Copy link
Member

Choose a reason for hiding this comment

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

nit: you can cast timer type to string and pass here to avoid depending on shared package in log package. I guess it's ok to depend on it here because all callers of log package is probably already importing shared.

Copy link
Member Author

Choose a reason for hiding this comment

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

I considered it more type-safe, so people pass the expected data, not just a string (though the data is actually a string)

@3vilhamster 3vilhamster merged commit 731cec6 into cadence-workflow:master Jul 4, 2024
20 checks passed
@3vilhamster 3vilhamster deleted the activity-timeout-extra-context branch July 4, 2024 12:23
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