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);
}
}
Aggregations