aboutsummaryrefslogtreecommitdiffstats
path: root/sources/hv-collector-main/src/main
diff options
context:
space:
mode:
authorFilip Krzywka <filip.krzywka@nokia.com>2019-01-22 12:56:53 +0100
committerFilip Krzywka <filip.krzywka@nokia.com>2019-01-22 13:00:19 +0100
commitda7ef3ec63a7393d1b48c4784ca8f8029176f935 (patch)
treec9dea41c468d83b68af4f69c5e378a79213baed4 /sources/hv-collector-main/src/main
parent4c529a33439cc40bf192ea3f8dac57d189d60b9f (diff)
Enable percentile histograms in metrics
To allow more precise graphing. Change-Id: I3c498b24c01e599eec316f552e25d06d653a08bb Issue-ID: DCAEGEN2-1107 Signed-off-by: Filip Krzywka <filip.krzywka@nokia.com>
Diffstat (limited to 'sources/hv-collector-main/src/main')
-rw-r--r--sources/hv-collector-main/src/main/kotlin/org/onap/dcae/collectors/veshv/main/metrics/MicrometerMetrics.kt9
1 files changed, 7 insertions, 2 deletions
diff --git a/sources/hv-collector-main/src/main/kotlin/org/onap/dcae/collectors/veshv/main/metrics/MicrometerMetrics.kt b/sources/hv-collector-main/src/main/kotlin/org/onap/dcae/collectors/veshv/main/metrics/MicrometerMetrics.kt
index b832bc9f..fd1d9c53 100644
--- a/sources/hv-collector-main/src/main/kotlin/org/onap/dcae/collectors/veshv/main/metrics/MicrometerMetrics.kt
+++ b/sources/hv-collector-main/src/main/kotlin/org/onap/dcae/collectors/veshv/main/metrics/MicrometerMetrics.kt
@@ -21,6 +21,7 @@ package org.onap.dcae.collectors.veshv.main.metrics
import arrow.syntax.function.memoize
import io.micrometer.core.instrument.Counter
+import io.micrometer.core.instrument.Timer
import io.micrometer.core.instrument.binder.jvm.ClassLoaderMetrics
import io.micrometer.core.instrument.binder.jvm.JvmGcMetrics
import io.micrometer.core.instrument.binder.jvm.JvmMemoryMetrics
@@ -53,8 +54,12 @@ class MicrometerMetrics internal constructor(
private val totalConnections = registry.counter(name(CONNECTIONS))
private val disconnections = registry.counter(name(DISCONNECTIONS))
- private val processingTime = registry.timer(name(MESSAGES, PROCESSING, TIME))
- private val totalLatency = registry.timer(name(MESSAGES, LATENCY))
+ private val processingTime = Timer.builder(name(MESSAGES, PROCESSING, TIME))
+ .publishPercentileHistogram(true)
+ .register(registry)
+ private val totalLatency = Timer.builder(name(MESSAGES, LATENCY))
+ .publishPercentileHistogram(true)
+ .register(registry)
private val sentMessages = registry.counter(name(MESSAGES, SENT))
private val sentMessagesByTopic = { topic: String ->