Package com.netflix.servo.tag

Examples of com.netflix.servo.tag.BasicTag


    }

    private void addGarbageCollectorMetrics(long timestamp, MetricList metrics) {
        final List<GarbageCollectorMXBean> beans = ManagementFactory.getGarbageCollectorMXBeans();
        for (GarbageCollectorMXBean bean : beans) {
            final Tag id = new BasicTag("id", bean.getName());
            metrics.add(new Metric(COLLECTION_COUNT.withAdditionalTag(id),
                    timestamp, bean.getCollectionCount()));
            metrics.add(new Metric(COLLECTION_TIME.withAdditionalTag(id),
                    timestamp, bean.getCollectionTime()));
        }
View Full Code Here


    @Test
    public void testTagByTag() {
        // Order will be in the order tags were added to the builder
        ObjectName name =
                ObjectNameBuilder.forDomain("testDomain")
                                 .addProperty(new BasicTag("foo", "bar"))
                                 .addProperty(new BasicTag("test", "stuff"))
                                 .build();
        assertEquals(name.getDomain(), "testDomain");
        assertEquals(name.getKeyPropertyListString(), "foo=bar,test=stuff");
    }
View Full Code Here

    public RouteStatusCodeMonitor(String route, int status_code) {
        if(route == null) route = "";
        this.route = route;
        this.status_code = status_code;
        route_code = route + "_" + status_code;
        tagList = BasicTagList.of(new BasicTag("ID", route_code));

    }
View Full Code Here

            route = "UNKNOWN";
        }
        id = route + "_" + cause;

        this.error_cause = cause;
        tagList = BasicTagList.of(new BasicTag("ID", id));



    }
View Full Code Here

TOP

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

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.