Examples of TagList


Examples of com.netflix.servo.tag.TagList

    }

    private void addMemoryPoolMetrics(long timestamp, MetricList metrics) {
        final List<MemoryPoolMXBean> beans = ManagementFactory.getMemoryPoolMXBeans();
        for (MemoryPoolMXBean bean : beans) {
            final TagList tags = BasicTagList.of("id", bean.getName(),
                    "memtype", bean.getType().name());
            addMemoryUsageMetrics(tags, timestamp, bean.getUsage(), metrics);
        }
    }
View Full Code Here

Examples of com.netflix.servo.tag.TagList

    }

    /** {@inheritDoc} */
    public boolean matches(MonitorConfig config) {
        String name = config.getName();
        TagList tags = config.getTags();
        String value;
        if (tagKey == null) {
            value = name;
        } else {
            Tag t = tags.getTag(tagKey);
            value = (t == null) ? null : t.getValue();
        }

        if (Strings.isNullOrEmpty(value)) {
            return root.matches(config);
View Full Code Here

Examples of com.netflix.servo.tag.TagList

    private static final String JMX_DOMAIN_KEY = "JmxDomain";

    @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

Examples of com.netflix.servo.tag.TagList

        assertEquals(name, "simpleMonitor");
    }

    @Test
    public void testMetricNamingWithTags() throws Exception {
        TagList tagList = BasicTagList.of("instance", "GetLogs", DataSourceType.KEY,
                "HystrixCommand");

        Metric m = new Metric("simpleMonitor", tagList, 0, 1000.0);

        GraphiteNamingConvention convention = new BasicGraphiteNamingConvention();
View Full Code Here

Examples of com.netflix.servo.tag.TagList

            final Counter c1 = Monitors.newCounter("publicCounter");
            @com.netflix.servo.annotations.Monitor(
                name = "primitiveGauge", type = DataSourceType.GAUGE)
            static final long A1 = 0L;
        };
        TagList tags = SortedTagList.builder().withTag("abc", "def").build();
        Monitors.addMonitors(monitors, null, tags, obj);

        assertEquals(monitors.size(), 10);
        for (Monitor m : monitors) {
            assertEquals(m.getConfig().getTags().getValue("class"), "MonitorsTest",
View Full Code Here

Examples of com.netflix.servo.tag.TagList

    @Test
    public void testAddMonitorFields() throws Exception {
        List<Monitor<?>> monitors = Lists.newArrayList();
        ClassWithMonitors obj = new ClassWithMonitors();

        TagList tags = SortedTagList.builder().withTag("abc", "def").build();

        Monitors.addMonitorFields(monitors, null, tags, obj, obj.getClass());
        Monitors.addMonitorFields(monitors, "foo", null, obj, obj.getClass());
        //System.out.println(monitors);
        assertEquals(monitors.size(), 8);
View Full Code Here

Examples of com.netflix.servo.tag.TagList

            if (i % 2 == 0) {
                dummy.method2(i);
            }
        }

        final TagList tagList = BasicTagList.of(
                TimedInterface.CLASS_TAG, "DummyImpl",
                TimedInterface.INTERFACE_TAG, "IDummy",
                TimedInterface.ID_TAG, "id");
        final MonitorConfig expectedConfig = MonitorConfig.builder(TimedInterface.TIMED_INTERFACE)
                .withTags(tagList).build();
View Full Code Here

Examples of com.netflix.servo.tag.TagList

        // you'd register the CompositeMonitor as:
        DefaultMonitorRegistry.getInstance().register((CompositeMonitor) dummy);

        final CompositeMonitor<Long> compositeMonitor = (CompositeMonitor<Long>) dummy;
        final TagList tagList = BasicTagList.of(
                TimedInterface.CLASS_TAG, "DummyImpl",
                TimedInterface.INTERFACE_TAG, "IDummy");
        final MonitorConfig expectedConfig = MonitorConfig.builder(TimedInterface.TIMED_INTERFACE)
                .withTags(tagList).build();
        assertEquals(compositeMonitor.getConfig(), expectedConfig);
View Full Code Here

Examples of flash.swf.types.TagList

    init();
  }

  private void init()
  {
    defineTags = new TagList();
    graphicContext.validateTransformStack();
    bounds = new Rect();
  }
View Full Code Here

Examples of flash.swf.types.TagList

   * @see #create()
   */
  private SpriteGraphics2D(SpriteGraphics2D swf2d)
  {
    super((GraphicContext)swf2d.graphicContext.clone());
    defineTags = new TagList();
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.