Anyone using ktor + micrometer metrics + google cl...
# ktor
r
Anyone using ktor + micrometer metrics + google cloud stackdriver? I'm finding ktor metrics are costing me upwards of $30/day on a mostly idle app. The amount of data that Google says is being received for these metrics, and what the code is apparently sending for each request seems out of whack. Anyone else seen this and figured out what is happening?
r
Anyone using ktor + micrometer metrics + google cloud stackdriver?
Yes for ktor + micrometer. Not using stackdriver though. From the sound of your message, we are also running on GCP. We are getting nowhere near those costs. Could it be you are logging A LOT since that could be the big different? Maybe something about your code being in one region and stackdriver somewhere else and you paying ingress and egress for everything?
r
Yup, GCP. These are specifically Stackdriver metrics costs, not logging data. Created by the ktor
MicrometerMetrics
plugin with a
StackdriverMeterRegistry
. According to Google, to take one representative day as an example, Google ingested 64.16 MiB of data for the
requests
metric, plus 6.42 MiB each for the
requests/px
,
request/count
, and
requests/max
metrics, for a total of 102.68 MiB. According to my logs, I received only 1085 request for the entire day, so Google is implying each metric received is around 100 Kbs of data. Looking at the ktor plugin code, I don't see how that much data is possible for each metric.
Billing shows specifically as "Metric Volume", not ingress and egress or networking costs.
Stackdriver / Cloud Monitoring is a global service, there are no regional ingress/egress costs.