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

Log worker retry count and retry count exhaustion #113

Merged
merged 5 commits into from
Oct 9, 2023
Merged

Conversation

stchris
Copy link
Contributor

@stchris stchris commented Oct 6, 2023

While doing some log forensics recently @tillprochaska and I noticed that it might be helpful to log the current retry count and make it clear when we are giving up on retries.

Although I dislike doing two things in one PR I also changed the worker tests to pytest-style, which I needed for a new test which is using a fixture.

@stchris stchris changed the title Log retries Log worker retry count and retry count exhaustion Oct 6, 2023
Copy link
Contributor

@tillprochaska tillprochaska left a comment

Choose a reason for hiding this comment

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

This looks good to me! Nice that you’ve even added a test for the logs.

How much work would it be to make use of structured logging for the retry counts, so we can filter for e.g. jsonPayload.retry = 0? I think it might be enough to pass it as a keyword argument to the log method…

@stchris
Copy link
Contributor Author

stchris commented Oct 6, 2023

How much work would it be to make use of structured logging for the retry counts, so we can filter for e.g. jsonPayload.retry = 0? I think it might be enough to pass it as a keyword argument to the log method…

Oh that's a great idea, it should be straightforward. I'll look into it.

@stchris stchris merged commit e1c102a into main Oct 9, 2023
1 check passed
@stchris stchris deleted the log-retries branch October 9, 2023 10:00
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