All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.zalando.axiom.web.krueger.AppMetricsService.kt Maven / Gradle / Ivy

Go to download

This library creates vertx web endpoints exposing application metrics that can be consumed by Krueger (https://github.com/zalando/krueger-cockpit)

There is a newer version: 1.2.0
Show newest version
package org.zalando.axiom.web.krueger

import io.vertx.core.AsyncResultHandler
import io.vertx.core.Vertx
import org.zalando.axiom.web.krueger.metrics.AppMetricsSupplier

class AppMetricsService(val vertx: Vertx, val metricsSuppliers: List) {

    fun getMetrics(handler: AsyncResultHandler>) {
        vertx.executeBlocking(handler, {
            metricsSuppliers.map { metricsSupplier -> metricsSupplier.supply() }.flatten().toSortedMap()
        })
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy