You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to use recently released loki-logger plugin.
I'm adding more nginx related labels in log_labels field.
However, nginx label doesn't work and getting error like this.
2023/07/17 04:39:17 [error] 49#49: *20640837 lua entry thread aborted: runtime error: /usr/local/apisix/apisix/core/utils.lua:299: attempt to index upvalue '_ctx' (a nil value)
stack traceback:
coroutine 0:
/usr/local/apisix/apisix/core/utils.lua: in function 'replace'
/usr/local/openresty/lualib/resty/core/regex.lua:1003: in function 're_gsub'
/usr/local/apisix/apisix/core/utils.lua:324: in function 'resolve_var'
/usr/local/apisix/apisix/plugins/loki-logger.lua:201: in function 'func'
/usr/local/apisix/apisix/utils/batch-processor.lua:88: in function </usr/local/apisix/apisix/utils/batch-processor.lua:80>, context: ngx.timer, client: 10.192.169.127, server: 0.0.0.0:9080
etcd version, if relevant (run curl http://127.0.0.1:9090/v1/server_info):
APISIX Dashboard version, if relevant:
Plugin runner version, for issues related to plugin runners:
LuaRocks version, for installation issues (run luarocks --version):
The text was updated successfully, but these errors were encountered:
yujinchoi-94
changed the title
help request: Got error with loki-logger log_labels
help request: Getting an error with log_labels in loki-logger
Jul 17, 2023
For track: The reason is that the logging is passed to batch processor which doesn't propagate request context and the callback uses the context of the original request which becomes nil as the request completes and logging is done asynchronously.
Description
Hi,
I'm trying to use recently released loki-logger plugin.
I'm adding more nginx related labels in log_labels field.
However, nginx label doesn't work and getting error like this.
Here's what I've tried
Is there anything wrong with the above configuration?
Thanks in advance :)
Environment
apisix version
):uname -a
):openresty -V
ornginx -V
):curl http://127.0.0.1:9090/v1/server_info
):luarocks --version
):The text was updated successfully, but these errors were encountered: