trino-gateway icon indicating copy to clipboard operation
trino-gateway copied to clipboard

Improve logging for backend cluster (de)activation

Open amybubu opened this issue 1 year ago • 2 comments

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`)

amybubu avatar Apr 15 '25 17:04 amybubu

LGTM!

andythsu avatar Apr 24 '25 00:04 andythsu

pinging @vishalya

andythsu avatar Apr 24 '25 18:04 andythsu

@Chaho12 @oneonestar @mosabua Please review commit messages from next time.

ebyhr avatar May 29 '25 03:05 ebyhr