trino-gateway
trino-gateway copied to clipboard
Improve logging for backend cluster (de)activation
Description
As apart of efforts to improve telemetry as described in Issue https://github.com/trinodb/trino-gateway/issues/649, this PR adds logging for whenever a backend cluster is activated/deactivated.
Testing
- built and ran locally
- confirmed logs appeared when calling de(activate) via curl call or changing deactivation status via the UI, e.g.:
2025-04-03T17:09:03.588-0700 INFO http-worker-87 io.trino.gateway.ha.router.HaGatewayManager Backend cluster trino-3 activation status changed to active=false (previous status: active=true).
- confirm error thrown if try to activate/deactivate non-existent backend
java.lang.IllegalStateException: No backend found with name: trino-4, could not activate
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:
* Fix some things. ({issue}`issuenumber`)
LGTM!
pinging @vishalya
@Chaho12 @oneonestar @mosabua Please review commit messages from next time.