spacewander commented on a change in pull request #6055:
URL: https://github.com/apache/apisix/pull/6055#discussion_r782638309
##########
File path: apisix/utils/batch-processor.lua
##########
@@ -161,7 +161,7 @@ function batch_processor:push(entry)
local entries = self.entry_buffer.entries
table.insert(entries, entry)
-- add batch metric for every route
- if batch_metrics then
+ if batch_metrics and self.name and self.route_id and self.server_addr then
Review comment:
I see. We can't use `ngx.var` in the timer. What about refactoring
`self.name and self.route_id and self.server_addr` into a function? Would be
better if we don't need to repeat the complex conditions.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]