From 9f53c6c5bc3ce4e4fad02e1f062c6ad6f184d23e Mon Sep 17 00:00:00 2001 From: "Hugh A. Miles II" Date: Mon, 29 Mar 2021 13:22:09 -0400 Subject: [PATCH] chore: add success log whenever a connection is working (#13811) --- superset/databases/commands/test_connection.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/superset/databases/commands/test_connection.py b/superset/databases/commands/test_connection.py index b6171f107..605ecd498 100644 --- a/superset/databases/commands/test_connection.py +++ b/superset/databases/commands/test_connection.py @@ -115,6 +115,12 @@ class TestConnectionDatabaseCommand(BaseCommand): if not engine.dialect.do_ping(conn): raise DBAPIError(None, None, None) + # Log succesful connection test with engine + event_logger.log_with_context( + action="test_connection_success", + engine=database.db_engine_spec.__name__, + ) + except (NoSuchModuleError, ModuleNotFoundError) as ex: event_logger.log_with_context( action=f"test_connection_error.{ex.__class__.__name__}",