• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java StandardExports类的典型用法和代码示例

java 1次浏览

本文整理汇总了Java中io.prometheus.client.hotspot.StandardExports的典型用法代码示例。如果您正苦于以下问题:Java StandardExports类的具体用法?Java StandardExports怎么用?Java StandardExports使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

StandardExports类属于io.prometheus.client.hotspot包,在下文中一共展示了StandardExports类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: init

点赞 3

import io.prometheus.client.hotspot.StandardExports; //导入依赖的package包/类
public static CollectorRegistry init(CollectorRegistry registry, Collection<HttpMetricsCollector> httpCollectors) {

        httpCollectors.forEach(it -> it.register(registry));

        //do not register the default metrics since we want full control here.
        new StandardExports().register(registry);
        new MemoryPoolsExports().register(registry);
        new ThreadExports().register(registry);

        new JvmGcMetrics().register(registry);
        Operation.getInstance().register(registry);
        Size.getInstance().register(registry);
        Status.getInstance().register(registry);

        // logback metrics
        LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory();
        //cannot use instrumented appender here since it is not possible to send in the registry
        LogbackMetricsAppender appender = new LogbackMetricsAppender(registry);
        appender.setContext(lc);
        appender.start();
        Logger root = (Logger) LoggerFactory.getLogger(Logger.ROOT_LOGGER_NAME);
        root.addAppender(appender);

        logger.debug("Registered standard, memory, thread, gc, httpcollectors and logback metrics");
        return registry;
    }
 

开发者ID:Skatteetaten,
项目名称:aurora-prometheus,
代码行数:27,
代码来源:MetricsConfig.java

示例2: registerPrometheusCollectors

点赞 2

import io.prometheus.client.hotspot.StandardExports; //导入依赖的package包/类
@PostConstruct
public void registerPrometheusCollectors() {
  CollectorRegistry.defaultRegistry.clear();
  new StandardExports().register();
  new MemoryPoolsExports().register();
  new DropwizardExports(dropwizardMetricRegistry).register();
}
 

开发者ID:reflectoring,
项目名称:coderadar,
代码行数:8,
代码来源:PrometheusConfiguration.java

示例3: PrometheusMetricSystem

点赞 1

import io.prometheus.client.hotspot.StandardExports; //导入依赖的package包/类
protected PrometheusMetricSystem(Map<String, Object> configuration) {
    this.configuration = configuration;

    new StandardExports().register();

    addJvmMetrics(configuration);

    addJmxCollector(configuration);

    startDefaultEndpoint();
}
 

开发者ID:willfleury,
项目名称:prometheus-metrics-agent,
代码行数:12,
代码来源:PrometheusMetricSystem.java

示例4: PrometheusMetricSystem

点赞 1

import io.prometheus.client.hotspot.StandardExports; //导入依赖的package包/类
protected PrometheusMetricSystem(Map<String, Object> configuration) {
    this.configuration = configuration;

    new StandardExports().register();

    addJVMMetrics(configuration);

    startDefaultEndpoint();
}
 

开发者ID:willfleury,
项目名称:metrics-agent,
代码行数:10,
代码来源:PrometheusMetricSystem.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)