Closed samsk closed 3 years ago
Thank you for reporting this. Could you tell us anything else about your system that might help us replicate (for example your Kong version or any other plugins you have installed)?
Sorry, I've forgotten. I've latest docker kong 2.3.2 and HEAD of the prometheus plugin. All other plugins are disabled.
docker config:
- LC_CTYPE=en_US.UTF-8
- LC_ALL=en_US.UTF-8
- KONG_LUA_PACKAGE_PATH=/plugins/?.lua
- KONG_PLUGINS=bundled,${KONG_CUSTOM_PLUGINS}
- KONG_LOG_LEVEL
- KONG_CASSANDRA_CONTACT_POINTS=kong-database
- KONG_PROXY_ACCESS_LOG=/dev/stdout
- KONG_ADMIN_ACCESS_LOG=/dev/stdout
- KONG_PROXY_ERROR_LOG=/dev/stderr
- KONG_ADMIN_ERROR_LOG=/dev/stderr
- KONG_ADMIN_LISTEN=0.0.0.0:8001, 0.0.0.0:8444 ssl
- KONG_TRUSTED_IPS=0.0.0.0/0,::/0
- KONG_ANONYMOUS_REPORTS=off
# - KONG_STREAM_LISTEN=0.0.0.0:8888
- KONG_HEADERS=
- KONG_PG_HOST
- KONG_PG_USER
- KONG_PG_PASSWORD
- KONG_PG_DATABASE
Maybe for clarification, curl to /metrics is broken after printing out metric_data(), and in log appears error stack trace.
Commenting out line 307 in exporter.lua - https://github.com/Kong/kong-plugin-prometheus/commit/d125bf35ce2b39426609ce09c94ef21771279314#diff-f73ec5229d22e2e8cfafdca76e8663e0b04f960a1e2a2cac361ea2e6f07285e7R307 fixes the problem.
Fixed in 1.1.0. Thanks
stream_api support introduced by d125bf35ce2b39426609ce09c94ef21771279314 breaks the plugin.
Without kong streaming enabled it results in:
and curl connection to /metrics is broken.
With streaming enabled
and curl connection is stalled for few seconds, finishing with
niltimeout
non-metric text.PS: I wanted to use HEAD to add some custom features, therefore I'm not using last release, but HEAD is now broken, so this issue is here to track it. I'll possibly use some previous commit for my work, but that will make the possibility to upstream it harder...