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

periodic cluster checks loop sends info logs in debug mode #1106

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

BelSasha
Copy link
Contributor

@BelSasha BelSasha commented Aug 5, 2024

We send status to den using the httpx library. When the call succeeds, and info log is steamed to server.log file.
I set a WARNING log level for the httpx client in the cluster servlet, so info logs ("HTTP/1.1 200 OK") won't be streamed. I set it only in the cluster servlet so it won't affect the httpx client in the http_client.py; the info logs streamed there is actually useful and do not spam the server.log file.

Feels a bit "hacky" to set a separate logger to the httpx client in the cluster servlet, but it is a one-line solution that works. Open to discuss other ideas and solutions you may have :)

Copy link
Contributor Author

BelSasha commented Aug 5, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

@BelSasha BelSasha marked this pull request as ready for review August 5, 2024 08:29
@BelSasha BelSasha requested a review from jlewitt1 August 5, 2024 08:29
@dongreenberg
Copy link
Contributor

I wouldn't switch back to requests, we really don't need two http dependencies. Also I think it's a much simpler assumption that we do these async, especially if we reuse the code elsewhere in the cluster servlet. Can we just set the log level for httpx or silence this properly?

@BelSasha BelSasha force-pushed the sb/log_successfull_den_requests_as_debug branch from 652a78f to 5f49d75 Compare August 6, 2024 08:33
@BelSasha BelSasha requested a review from dongreenberg August 6, 2024 08:36
@BelSasha BelSasha force-pushed the sb/log_successfull_den_requests_as_debug branch from 5f49d75 to b589855 Compare August 18, 2024 13:10
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