use evironment name for metric collection
removed not needed log
only log duration if a change is detected
added test for project level historical data