It depends on how globally you want this dsn change to apply. If you want it to affect everyone, an application var is probably right. But if you want it only to apply to developers who have switched this feature on for some temporary testing, while other users continue using the production db, then a session var makes more sense.
In any case, think through how things will and should behave if this changes during a user's session, or even during a request.