Add metrics tracking