@Test public void testDefaultTags() throws Exception { MetricPoller poller = new JmxMetricPoller( new LocalJmxConnector(), Collections.singletonList(new ObjectName("java.lang:type=OperatingSystem")), MATCH_ALL, true, Collections.singletonList(Tags.newTag("HostName", "localhost"))); List<Metric> metrics = poller.poll(MATCH_ALL); for (Metric m : metrics) { Map<String, String> tags = m.getConfig().getTags().asMap(); assertEquals(tags.get("HostName"), "localhost"); } }
public List<Metric> poll(MetricFilter filter) { return poll(filter, false); }
JmxMetricPoller implements MetricPoller { public List<Metric> poll(MetricFilter filter) { return poll(filter, false); } }
JmxMetricPoller implements MetricPoller { public List<Metric> poll(MetricFilter filter) { return poll(filter, false); } JmxMetricPoller(
      JmxConnector connector, ObjectName query, MetricFilter counters);  JmxMetricPoller(
      JmxConnector connector, List<ObjectName> queries, MetricFilter counters);  JmxMetricPoller(
      JmxConnector connector, List<ObjectName> queries, MetricFilter counters,
      boolean onlyNumericMetrics, List<Tag> defaultTags); }
JmxMetricPoller implements MetricPoller { public List<Metric> poll(MetricFilter filter) { return poll(filter, false); } JmxMetricPoller(
      JmxConnector connector, ObjectName query, MetricFilter counters);  JmxMetricPoller(
      JmxConnector connector, List<ObjectName> queries, MetricFilter counters);  JmxMetricPoller(
      JmxConnector connector, List<ObjectName> queries, MetricFilter counters,
      boolean onlyNumericMetrics, List<Tag> defaultTags); List<Metric> poll(MetricFilter filter); List<Metric> poll(MetricFilter filter, boolean reset); }
JmxMetricPoller implements MetricPoller { public List<Metric> poll(MetricFilter filter) { return poll(filter, false); } JmxMetricPoller(
      JmxConnector connector, ObjectName query, MetricFilter counters);  JmxMetricPoller(
      JmxConnector connector, List<ObjectName> queries, MetricFilter counters);  JmxMetricPoller(
      JmxConnector connector, List<ObjectName> queries, MetricFilter counters,
      boolean onlyNumericMetrics, List<Tag> defaultTags); List<Metric> poll(MetricFilter filter); List<Metric> poll(MetricFilter filter, boolean reset);  }