presto-main/src/main/java/io/prestosql/execution/SqlQueryManager.java/SqlQueryManager/addFinalQueryInfoListener
class SqlQueryManager:    public void addFinalQueryInfoListener(QueryId queryId, StateChangeListener<QueryInfo> stateChangeListener)
    {
        queryTracker.getQuery(queryId).addFinalQueryInfoListener(stateChangeListener);
    }