Add groups support to metrics