Can we move this to `ResourceInstance` so that every api action gets logged?