-
Notifications
You must be signed in to change notification settings - Fork 129
chore(guard): fix log levels #2580
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
chore(guard): fix log levels #2580
Conversation
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
How to use the Graphite Merge QueueAdd the label merge-queue to this PR to add it to the merge queue. You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
Comprehensive update to logging levels across the guard infrastructure to improve production log signal-to-noise ratio and maintainability.
- Downgraded routine operations (WebSocket connections, request handling) from
infotodebuginpackages/edge/infra/guard/core/src/proxy_service.rs - Upgraded configuration failures to
warnlevel and enhanced error formatting with?errsyntax inpackages/edge/infra/guard/server/src/tls.rs - Removed unused imports (
tracing::warn,regex::Regex) from request context and util files - Standardized error variable naming from
etoerracross multiple files for consistency - Improved structured logging patterns and upgraded routing timeouts from
warntoerrorin proxy service
7 files reviewed, 2 comments
Edit PR Review Bot Settings | Greptile
| tracing::error!("{} connection error: {}", port_type_str, err); | ||
| } | ||
| info!("{} connection dropped: {}", port_type_str, remote_addr); | ||
| tracing::debug!("{} connection dropped: {}", port_type_str, remote_addr); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: Consider adding structured logging fields here to make connection errors more easily parseable. Use the ?err syntax like other error logs in this file.
| tracing::error!("{} connection error: {}", port_type_str, err); | |
| } | |
| info!("{} connection dropped: {}", port_type_str, remote_addr); | |
| tracing::debug!("{} connection dropped: {}", port_type_str, remote_addr); | |
| if let Err(err) = conn.await { | |
| tracing::error!(?err, "{} connection error", port_type_str); | |
| } | |
| tracing::debug!("{} connection dropped: {}", port_type_str, remote_addr); |
| }, | ||
| Some(Err(e)) => { | ||
| Some(Err(err)) => { | ||
| // Error receiving message from client | ||
| error!("Error receiving message from client: {}", e); | ||
| error!("Error details: {:?}", e); | ||
| tracing::debug!(?err, "Error receiving message from client"); | ||
| tracing::debug!(?err, "Error details"); | ||
| // Signal shutdown to other direction | ||
| let _ = shutdown_tx.send(true); | ||
| break; | ||
| }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: Duplicate error logging removed - the first log line already includes error details through ?err
| }, | |
| Some(Err(e)) => { | |
| Some(Err(err)) => { | |
| // Error receiving message from client | |
| error!("Error receiving message from client: {}", e); | |
| error!("Error details: {:?}", e); | |
| tracing::debug!(?err, "Error receiving message from client"); | |
| tracing::debug!(?err, "Error details"); | |
| // Signal shutdown to other direction | |
| let _ = shutdown_tx.send(true); | |
| break; | |
| }, | |
| }, | |
| Some(Err(err)) => { | |
| // Error receiving message from client | |
| tracing::debug!(?err, "Error receiving message from client"); | |
| // Signal shutdown to other direction | |
| let _ = shutdown_tx.send(true); | |
| break; | |
| }, |
fa955f0 to
b3aa8b4
Compare
ef7fce9 to
2bdeefd
Compare
2bdeefd to
fba1301
Compare
b3aa8b4 to
2e8e98f
Compare
2e8e98f to
4a380a5
Compare
fba1301 to
84f7df4
Compare
84f7df4 to
cfc30cf
Compare
4a380a5 to
84aaf41
Compare
a8d0391 to
bc3dd6c
Compare
bc3dd6c to
a8d0391
Compare
01bc6a9 to
cfc30cf
Compare
a8d0391 to
84aaf41
Compare
84aaf41 to
c33d751
Compare
cfc30cf to
a3cf488
Compare
a3cf488 to
6ce34ef
Compare
c33d751 to
5b30dea
Compare
Merge activity
|
<!-- Please make sure there is an issue that this PR is correlated to. --> ## Changes <!-- If there are frontend changes, please include screenshots. -->

Changes