apisix icon indicating copy to clipboard operation
apisix copied to clipboard

help request: Request for Assistance: Loki Logging Not Receiving Logs from Specific APIsix Route

Open guliuliu1 opened this issue 1 year ago • 0 comments

Description

Expected Behavior: Logs from all routes configured in APIsix should be captured by Loki as per the logging configuration provided.

Current Behavior: Logs from URIs under /_AMapService/* are not reaching Loki, whereas logs from other routes are functioning correctly.

Steps to Reproduce:

Configure APIsix with the provided service configuration. Send requests to the URIs /_AMapService/* and /_AMapService/. Verify Loki logging endpoint for captured logs. Additional Information:

{ "uris": [ "/_AMapService/*", "/_AMapService/" ], "name": "gaode",

"priority": 1, "methods": [ "GET", "POST", "PUT", "DELETE", "PATCH", "HEAD", "OPTIONS", "CONNECT", "TRACE", "PURGE" ], "host": "yy.ba.cn", "plugins": { "proxy-rewrite": { "regex_uri": [ "^/_AMapService/(.*)$", "/$1?jscode=42f04cccaa94c23c5" ], "scheme": "https", "use_real_request_uri_unsafe": false }, "loki-logger": {
"endpoint_addrs": ["http://192.168.0.123:4100"], "include_req_body": true, "include_resp_body": true } }, "upstream": { "nodes": [ { "host": "restapi.amap.com", "port": 443, "weight": 1 } ], "timeout": { "connect": 6, "send": 6, "read": 6 }, "type": "roundrobin", "hash_on": "vars", "scheme": "https", "pass_host": "pass", "keepalive_pool": { "idle_timeout": 60, "requests": 1000, "size": 320 } }, "labels": { "API_VERSION": "v2", }, "enable_websocket": true, "status": 1 }

Environment

  • APISIX version (3.9.0):
  • Operating system (run uname -a): Linux localhost.localdomain 3.10.0-1160.el7.x86_64 #1 SMP Mon Oct 19 16:18:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
  • OpenResty / Nginx version (run openresty -V or nginx -V):
  • nginx version: openresty/1.25.3.1 built by gcc 9.3.1 20200408 (Red Hat 9.3.1-2) (GCC) built with OpenSSL 3.2.0 23 Nov 2023 TLS SNI support enabled configure arguments: --prefix=/usr/local/openresty/nginx --with-cc-opt='-O2 -DAPISIX_RUNTIME_VER=1.2.0 -DNGX_GRPC_CLI_ENGINE_PATH=/usr/local/openresty/libgrpc_engine.so -DNGX_HTTP_GRPC_CLI_ENGINE_PATH=/usr/local/openresty/libgrpc_engine.so -DNGX_LUA_ABORT_AT_PANIC -I/usr/local/openresty/zlib/include -I/usr/local/openresty/pcre/include -I/usr/local/openresty/openssl3/include' --add-module=../ngx_devel_kit-0.3.3 --add-module=../echo-nginx-module-0.63 --add-module=../xss-nginx-module-0.06 --add-module=../ngx_coolkit-0.2 --add-module=../set-misc-nginx-module-0.33 --add-module=../form-input-nginx-module-0.12 --add-module=../encrypted-session-nginx-module-0.09 --add-module=../srcache-nginx-module-0.33 --add-module=../ngx_lua-0.10.26 --add-module=../ngx_lua_upstream-0.07 --add-module=../headers-more-nginx-module-0.37 --add-module=../array-var-nginx-module-0.06 --add-module=../memc-nginx-module-0.20 --add-module=../redis2-nginx-module-0.15 --add-module=../redis-nginx-module-0.3.9 --add-module=../ngx_stream_lua-0.0.14 --with-ld-opt='-Wl,-rpath,/usr/local/openresty/luajit/lib -Wl,-rpath,/usr/local/openresty/wasmtime-c-api/lib -L/usr/local/openresty/zlib/lib -L/usr/local/openresty/pcre/lib -L/usr/local/openresty/openssl3/lib -Wl,-rpath,/usr/local/openresty/zlib/lib:/usr/local/openresty/pcre/lib:/usr/local/openresty/openssl3/lib' --add-module=/tmp/tmp.HkXszPkFpt/openresty-1.25.3.1/../mod_dubbo-1.0.2 --add-module=/tmp/tmp.HkXszPkFpt/openresty-1.25.3.1/../ngx_multi_upstream_module-1.2.0 --add-module=/tmp/tmp.HkXszPkFpt/openresty-1.25.3.1/../apisix-nginx-module-1.16.0 --add-module=/tmp/tmp.HkXszPkFpt/openresty-1.25.3.1/../apisix-nginx-module-1.16.0/src/stream --add-module=/tmp/tmp.HkXszPkFpt/openresty-1.25.3.1/../apisix-nginx-module-1.16.0/src/meta --add-module=/tmp/tmp.HkXszPkFpt/openresty-1.25.3.1/../wasm-nginx-module-0.7.0 --add-module=/tmp/tmp.HkXszPkFpt/openresty-1.25.3.1/../lua-var-nginx-module-v0.5.3 --add-module=/tmp/tmp.HkXszPkFpt/openresty-1.25.3.1/../grpc-client-nginx-module-v0.5.0 --add-module=/tmp/tmp.HkXszPkFpt/openresty-1.25.3.1/../lua-resty-events-0.2.0 --with-poll_module --with-pcre-jit --with-stream --with-stream_ssl_module --with-stream_ssl_preread_module --with-http_v2_module --with-http_v3_module --without-mail_pop3_module --without-mail_imap_module --without-mail_smtp_module --with-http_stub_status_module --with-http_realip_module --with-http_addition_module --with-http_auth_request_module --with-http_secure_link_module --with-http_random_index_module --with-http_gzip_static_module --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-threads --with-compat --with-stream --without-pcre2 --with-http_ssl_module

guliuliu1 avatar Jun 17 '24 11:06 guliuliu1