Adding metrics to TaskInvoker in serverRegistry

I like this. We could apply this consistently across all metric classes.