metrics on request template was missing

think on some php versions global in a closure doesnt work well.
this pull request allows me to see the metrics on the request template