Backport of Swift Monitoring