Search in sources :

Example 1 with BufferPoolsExports

use of io.prometheus.client.hotspot.BufferPoolsExports in project MantaroBot by Mantaro.

the class Prometheus method enable.

public static void enable() throws IOException {
    if (STATE.compareAndSet(State.DISABLED, State.ENABLING)) {
        // replaced by jfr? needs testing, if yes then remove
        // used for cpu usage
        new StandardExports().register();
        // replaced by jfr? needs testing, if yes then remove
        // used for memory usage
        new MemoryPoolsExports().register();
        // ig we can keep this one for now
        new BufferPoolsExports().register();
        JFRExports.register();
        var config = MantaroData.config().get();
        server = new HTTPServer(config.prometheusHost, config.prometheusPort);
        STATE.set(State.ENABLED);
    }
}
Also used : HTTPServer(io.prometheus.client.exporter.HTTPServer) StandardExports(io.prometheus.client.hotspot.StandardExports) BufferPoolsExports(io.prometheus.client.hotspot.BufferPoolsExports) MemoryPoolsExports(io.prometheus.client.hotspot.MemoryPoolsExports)

Aggregations

HTTPServer (io.prometheus.client.exporter.HTTPServer)1 BufferPoolsExports (io.prometheus.client.hotspot.BufferPoolsExports)1 MemoryPoolsExports (io.prometheus.client.hotspot.MemoryPoolsExports)1 StandardExports (io.prometheus.client.hotspot.StandardExports)1