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

Move health check logs to debug level #1773

Merged
merged 1 commit into from
Mar 14, 2024
Merged

Conversation

vroldanbet
Copy link
Contributor

@vroldanbet vroldanbet commented Mar 1, 2024

The gRPC health check endpoint tends to cause noise in SpiceDB logs. This PR changes how the grpc log Middleware is installed so the grpc health route is logged at debug level.

@vroldanbet vroldanbet requested a review from a team as a code owner March 1, 2024 13:53
@github-actions github-actions bot added the area/CLI Affects the command line label Mar 1, 2024
@jzelinskie
Copy link
Member

Maybe we can set it so it only occurs when debug logging is set? When you first run something, it's super helpful to know if the healthcheck is reachable.

@jzelinskie jzelinskie added the area/tooling Affects the dev or user toolchain (e.g. tests, ci, build tools) label Mar 1, 2024
@github-actions github-actions bot removed the area/tooling Affects the dev or user toolchain (e.g. tests, ci, build tools) label Mar 6, 2024
@vroldanbet
Copy link
Contributor Author

@jzelinskie please have another look. health check calls are now moved to debug level. It's not great because grpc middleware does not have native support for something like this, but the proposed approach gets the job done.

ecordell
ecordell previously approved these changes Mar 11, 2024
Copy link
Contributor

@ecordell ecordell left a comment

Choose a reason for hiding this comment

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

LGTM, though we'll want to test this and make sure everything logs as intended

@vroldanbet
Copy link
Contributor Author

vroldanbet commented Mar 12, 2024

@ecordell thanks for the review 🙏🏻 I had already done tests locally for verification 👍🏻
Please have another look, had to rebase on top of conflicting changes.

I noticed #1772 did not propagate the traceID to the dispatch API, so I did it in this PR, basically moving the otel MW before the log MW, and add the corresponding logger option. This would make log correlation in a cluster possible.

@vroldanbet vroldanbet changed the title disables health check logs Move health check logs to debug level Mar 12, 2024
they introduce noise in SpiceDB logs
@vroldanbet vroldanbet added this pull request to the merge queue Mar 14, 2024
Merged via the queue into main with commit f1e72c9 Mar 14, 2024
19 of 20 checks passed
@vroldanbet vroldanbet deleted the disable-health-check-logs branch March 14, 2024 09:24
@github-actions github-actions bot locked and limited conversation to collaborators Mar 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/CLI Affects the command line
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants