Skip to content

Commit a050fa4

Browse files
committed
refactor
1 parent 4595010 commit a050fa4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

services/src/main/java/spp/probe/services/common/ContextReceiver.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ object ContextReceiver {
164164
val (_, meterType, metricValue) = ProbeMemory["spp.live-meter:$meterId"] as LiveMeter? ?: return
165165
val meter = ProbeMemory.computeIfAbsent("spp.base-meter:$meterId") {
166166
when (meterType) {
167-
MeterType.COUNTER -> return@computeIfAbsent MeterFactory.counter(
167+
MeterType.COUNT -> return@computeIfAbsent MeterFactory.counter(
168168
"counter_" + meterId.replace("-", "_")
169169
).mode(CounterMode.RATE)
170170
.build()
@@ -181,7 +181,7 @@ object ContextReceiver {
181181
}
182182
}
183183
when (meterType) {
184-
MeterType.COUNTER -> if (metricValue.valueType == MetricValueType.NUMBER) {
184+
MeterType.COUNT -> if (metricValue.valueType == MetricValueType.NUMBER) {
185185
(meter as Counter).increment(metricValue.value.toLong().toDouble())
186186
} else {
187187
throw UnsupportedOperationException("todo") //todo: this

0 commit comments

Comments
 (0)