-
Notifications
You must be signed in to change notification settings - Fork 94
Add logging when (de)activating backend clusters #672
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
base: main
Are you sure you want to change the base?
Conversation
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.
Thanks @amybubu ! Ensuring we have good logging around this has been very helpful to track down the sequence of events for cluster activation/deactivation
gateway-ha/src/main/java/io/trino/gateway/ha/router/HaGatewayManager.java
Outdated
Show resolved
Hide resolved
gateway-ha/src/main/java/io/trino/gateway/ha/router/HaGatewayManager.java
Outdated
Show resolved
Hide resolved
gateway-ha/src/main/java/io/trino/gateway/ha/router/HaGatewayManager.java
Outdated
Show resolved
Hide resolved
gateway-ha/src/main/java/io/trino/gateway/ha/router/HaGatewayManager.java
Show resolved
Hide resolved
gateway-ha/src/main/java/io/trino/gateway/ha/router/HaGatewayManager.java
Outdated
Show resolved
Hide resolved
gateway-ha/src/main/java/io/trino/gateway/ha/router/HaGatewayManager.java
Outdated
Show resolved
Hide resolved
gateway-ha/src/main/java/io/trino/gateway/ha/router/HaGatewayManager.java
Outdated
Show resolved
Hide resolved
gateway-ha/src/main/java/io/trino/gateway/ha/router/HaGatewayManager.java
Outdated
Show resolved
Hide resolved
gateway-ha/src/main/java/io/trino/gateway/ha/router/HaGatewayManager.java
Outdated
Show resolved
Hide resolved
gateway-ha/src/main/java/io/trino/gateway/ha/router/HaGatewayManager.java
Outdated
Show resolved
Hide resolved
LGTM! |
gateway-ha/src/main/java/io/trino/gateway/ha/router/HaGatewayManager.java
Outdated
Show resolved
Hide resolved
pinging @vishalya |
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.
Please squash commits into one and update the PR & commit title.
The current PR title looks misleading. It adds not only logging but also "dao.findFirstByName" call.
logActivationStatusChange(clusterName, newStatus, prevStatus); | ||
} | ||
catch (Exception e) { | ||
log.error("Failed to update activation status for cluster %s: %s", clusterName, e.getMessage()); |
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.
GatewayResource also logs the error message. I don't think we should log the similar message twice.
Description
As apart of efforts to improve telemetry as described in Issue #649, this PR adds logging for whenever a backend cluster is activated/deactivated.
Testing
Additional context and related issues
Release notes
( ) This is not user-visible or is docs only, and no release notes are required.
( ) Release notes are required. Please propose a release note for me.
( ) Release notes are required, with the following suggested text: