Added code to respond to /metrics/query requests