Package com.netflix.servo.tag

Examples of com.netflix.servo.tag.Tag


    @Override
    public String getName(Metric metric) {
        MonitorConfig config = metric.getConfig();
        TagList tags = config.getTags();

        Tag domainTag = tags.getTag(JMX_DOMAIN_KEY);
        if (domainTag != null) { // jmx metric
            return handleJmxMetric(config, tags);
        } else {
            return handleMetric(config, tags);
        }
View Full Code Here


    public void testHasUnitTag() throws Exception {
        DynamicTimer.start("test1", tagList);
        CompositeMonitor c = (CompositeMonitor<Long>) getByName("test1");
        List<Monitor<?>> monitors = c.getMonitors();
        for (Monitor<?> m : monitors) {
            Tag type = m.getConfig().getTags().getTag("unit");
            assertEquals(type.getValue(), "MILLISECONDS");
        }
    }
View Full Code Here

        return new BasicCounter(MonitorConfig.builder(name).build());
    }

    @Test
    public void testHasCounterTag() throws Exception {
        Tag type = newInstance("foo").getConfig().getTags().getTag(DataSourceType.KEY);
        assertEquals(type.getValue(), "COUNTER");
    }
View Full Code Here

    }

    @Test
    public void testHasRightType() throws Exception {
        Tag type = newInstance("foo").getConfig().getTags().getTag(DataSourceType.KEY);
        assertEquals(type.getValue(), "GAUGE");
    }
View Full Code Here

    @Test
    public void testHasRightType() throws Exception {
        DynamicCounter.increment("test1", tagList);
        StepCounter c = getByName("test1");
        Tag type = c.getConfig().getTags().getTag(DataSourceType.KEY);
        assertEquals(type.getValue(), "NORMALIZED");
    }
View Full Code Here

TOP

Related Classes of com.netflix.servo.tag.Tag

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.