hdarritchon
11/20/2018, 1:21 PMdave08
11/20/2018, 1:52 PMval globalRegistry = PrometheusMeterRegistry(PrometheusConfig.DEFAULT) // Or dropwizard, check micrometer docs..
install(Metrics) {
registry = globalRegistry
meterBinders = listOf()
}
and use this in your Routing: get("/metrics") {
call.respondText { (application.feature(Metrics).registry as PrometheusMeterRegistry).scrape() }
}
, I don't know how similar it is with the original implementation though...dave08
11/20/2018, 1:53 PMhdarritchon
11/20/2018, 5:21 PMhdarritchon
11/20/2018, 5:21 PMhdarritchon
11/20/2018, 5:21 PMget<MetricsLocation> {
val meters = feature(Metrics)
.registry
.gauges
.map { (key, value) -> Pair(key, value.value) }
//.mapValues { entry -> entry.value.value }
//val katalogStats = KatalogStats.from(meters)
call.respond {
meters
}
}
hdarritchon
11/20/2018, 5:23 PMhdarritchon
11/20/2018, 5:23 PMhdarritchon
11/20/2018, 5:23 PMhdarritchon
11/20/2018, 5:24 PMdave08
11/20/2018, 5:24 PMdave08
11/20/2018, 5:25 PMdave08
11/20/2018, 5:25 PMdave08
11/20/2018, 5:26 PMdave08
11/20/2018, 5:27 PMdave08
11/20/2018, 5:28 PMhdarritchon
11/20/2018, 5:32 PMdave08
11/20/2018, 5:34 PMdave08
11/20/2018, 5:34 PMdave08
11/20/2018, 5:36 PMhdarritchon
11/20/2018, 5:37 PMhdarritchon
11/20/2018, 5:42 PMdave08
11/20/2018, 5:44 PMdave08
11/20/2018, 5:45 PMhdarritchon
11/20/2018, 5:55 PM