public static Map<String, String> getTags(String... keyValue) {
        if ((keyValue.length % 2) != 0)
            throw new IllegalArgumentException("keyValue needs to be specified in pairs");
        Map<String, String> tags = new LinkedHashMap<>(keyValue.length / 2);

        for (int i = 0; i < keyValue.length; i += 2)
            tags.put(keyValue[i], keyValue[i + 1]);
        return tags;
    }
@Test
    public void testCreatingTags() {
        Map<String, String> tags = MetricsUtils.getTags("k1", "v1", "k2", "v2");
        assertEquals("v1", tags.get("k1"));
        assertEquals("v2", tags.get("k2"));
        assertEquals(2, tags.size());
    }