From 7e6e013967118a6a5231b07141c05086afb39519 Mon Sep 17 00:00:00 2001 From: Dinh Anh Tuan Tran Date: Wed, 10 Jan 2024 09:51:52 +0100 Subject: [PATCH] fix metrics, everything was severe --- .../src/main/kotlin/no/nav/helse/rapids_rivers/River.kt | 2 +- .../src/main/kotlin/no/nav/helse/rapids_rivers/RiverMetrics.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hm-rapids-and-rivers-v2-core/src/main/kotlin/no/nav/helse/rapids_rivers/River.kt b/hm-rapids-and-rivers-v2-core/src/main/kotlin/no/nav/helse/rapids_rivers/River.kt index 100cbd1..3b147f4 100644 --- a/hm-rapids-and-rivers-v2-core/src/main/kotlin/no/nav/helse/rapids_rivers/River.kt +++ b/hm-rapids-and-rivers-v2-core/src/main/kotlin/no/nav/helse/rapids_rivers/River.kt @@ -82,7 +82,7 @@ class River(rapidsConnection: RapidsConnection, private val riverMetrics: RiverM riverMetrics.timer(context.rapidName(), it.name(), eventName) { it.onPacket(packet, context) } - riverMetrics.messageCounter(context.rapidName(), it.name(), "success") + riverMetrics.messageCounter(context.rapidName(), it.name(), "ok") } } diff --git a/hm-rapids-and-rivers-v2-core/src/main/kotlin/no/nav/helse/rapids_rivers/RiverMetrics.kt b/hm-rapids-and-rivers-v2-core/src/main/kotlin/no/nav/helse/rapids_rivers/RiverMetrics.kt index 908557f..d5d4f72 100644 --- a/hm-rapids-and-rivers-v2-core/src/main/kotlin/no/nav/helse/rapids_rivers/RiverMetrics.kt +++ b/hm-rapids-and-rivers-v2-core/src/main/kotlin/no/nav/helse/rapids_rivers/RiverMetrics.kt @@ -21,7 +21,7 @@ class RiverMetrics: MeterBinder { fun messageCounter(rapidName:String, riverName: String, status: String) { LOG.debug("Incrementing message counter for rapid {} and river {} with status {}", rapidName, riverName, status) - Counter.builder("message_counter").tags("rapid",rapidName, "river", riverName, "status", "severe") + Counter.builder("message_counter").tags("rapid",rapidName, "river", riverName, "status", status) .register(meterRegistry) .increment() }