renshunhang opened a new issue, #12542: URL: https://github.com/apache/apisix/issues/12542
### Description 1、In my custom plugin, token-collector, there is a configuration called upstream_to_service, as shown below: {"upstream_to_service":{"172.31.197.177:32099":"service1"}}. This is registered using core.ctx.register_var in the before_proxy phase. <img width="847" height="320" alt="Image" src="https://github.com/user-attachments/assets/e6f79084-f6f5-471c-986c-6f19eeec83fd" /> 2、My route references both the token-collector and the built-in loki-logger plugin in APISIX. 3、Normally, if the route is configured with upstream_to_service, there will be a service_name field reported to Loki, with the value being service1. 4、When I remove the upstream_to_service configuration from the token-collector plugin, the service_name field is still present in the logs sent to Loki, and its value remains service1. 5、I noticed that many requests are concurrently reported to Loki. If a certain field in one request does not have a value, it should not be included in the report to Loki. However, the current phenomenon is that this field is randomly filled with the value from the previous request's field. ### Environment - APISIX version (run `apisix version`): - Operating system (run `uname -a`): - OpenResty / Nginx version (run `openresty -V` or `nginx -V`): - 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`): -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org