Another quick question... But where can I find inf...
# ktor
h
Another quick question... But where can I find information about the metric
ktor.http.server.requests.active
apparently this is returning a negative value, so I was curious to figure out how this is calculated.
a
Can you please describe your problem in more detail?
h
Absolutely! So for this one, I was curious to understand a little bit more about the metrics that Ktor expose, such as the one above. For example, looking at the metric, it seems that it is returning a negative value, I'm super curious about why the number of active connections are "decreasing". For example:
Sorry, but also this one.. Not sure if my explanation made sense?
a
This metric reflects the number of the current processed requests. It shouldn't be negative. Can you tell me how to reproduce your problem?
h
I will share with you tomorrow the snippet, but mainly adding the metrics plugin... I don't suppose we make any change.
As promised, this is how we set it:
Copy code
install(MicrometerMetrics) {
        registry = statsdMeterRegistry { configurationParameter ->
            when (configurationParameter) {
                MicrometerMetricConstants.STATSD_HOST -> MicrometerMetricConstants.PLATFORM_STATSD
                else -> null
            }
        }.apply {
            meterBinders = listOf(
                ClassLoaderMetrics(),
                JvmMemoryMetrics(),
                JvmGcMetrics(),
                ProcessorMetrics(),
                JvmThreadMetrics(),
            )
        }
    }