/** * Register the Collector with the default registry. */ public <T extends Collector> T register() { return register(CollectorRegistry.defaultRegistry); }
@Override public <T extends Collector> T register(CollectorRegistry registry) { if (sessionFactories.isEmpty()) { throw new IllegalStateException("You must register at least one SessionFactory."); } return super.register(registry); }
@Override public <T extends Collector> T register(CollectorRegistry registry) { if (queuedThreadPoolMap.isEmpty()) { throw new IllegalStateException("You must register at least one QueuedThreadPool."); } return super.register(registry); }
/** * Pushes all metrics in a Collector, replacing only previously pushed metrics of the same name, job and grouping key. * <p> * This is useful for pushing a single Gauge. * <p> * This uses the POST HTTP method. */ public void pushAdd(Collector collector, String job, Map<String, String> groupingKey) throws IOException { CollectorRegistry registry = new CollectorRegistry(); collector.register(registry); pushAdd(registry, job, groupingKey); }
/** * Pushes all metrics in a Collector, replacing all those with the same job and no grouping key. * <p> * This is useful for pushing a single Gauge. * <p> * This uses the PUT HTTP method. */ public void push(Collector collector, String job) throws IOException { CollectorRegistry registry = new CollectorRegistry(); collector.register(registry); push(registry, job); }
/** * Pushes all metrics in a Collector, replacing all those with the same job and grouping key. * <p> * This is useful for pushing a single Gauge. * <p> * This uses the PUT HTTP method. */ public void push(Collector collector, String job, Map<String, String> groupingKey) throws IOException { CollectorRegistry registry = new CollectorRegistry(); collector.register(registry); push(registry, job, groupingKey); }
/** * Pushes all metrics in a Collector, replacing only previously pushed metrics of the same name and job and no grouping key. * <p> * This is useful for pushing a single Gauge. * <p> * This uses the POST HTTP method. */ public void pushAdd(Collector collector, String job) throws IOException { CollectorRegistry registry = new CollectorRegistry(); collector.register(registry); pushAdd(registry, job); }
/** * Register the Collector with the default registry. */ public <T extends Collector> T register() { return register(CollectorRegistry.defaultRegistry); }
private void registerMetrics(Collector collector) { try { collector.register(registry); } catch (Exception e) { // Ignore if these were already registered if (log.isDebugEnabled()) { log.debug("Failed to register Prometheus collector exports", e); } } }
return zkServer.getZKDatabase().getNodeCount(); }).register(); return zkServer.getZKDatabase().getDataTree().approximateDataSize(); }).register(); return zkServer.serverStats().getNumAliveClientConnections(); }).register(); return zkServer.getZKDatabase().getDataTree().getWatchCount(); }).register(); return zkServer.getZKDatabase().getDataTree().getEphemeralsCount(); }).register();
return zkServer.getZKDatabase().getNodeCount(); }).register(); return zkServer.getZKDatabase().getDataTree().approximateDataSize(); }).register(); }).register(); return zkServer.getZKDatabase().getDataTree().getWatchCount(); }).register(); return zkServer.getZKDatabase().getDataTree().getEphemeralsCount(); }).register();