bisakhmondal commented on a change in pull request #5463:
URL: https://github.com/apache/apisix/pull/5463#discussion_r745534766
##########
File path: apisix/plugins/datadog.lua
##########
@@ -83,15 +85,24 @@ local function generate_tag(entry, const_tags)
tags = {}
end
- -- priority on route name, if not found using the route id.
- if entry.route_name ~= "" then
+ -- priority on route_name & prefer_name, if not found fall back to the
route id
+ if entry.prefer_name and entry.route_name ~= "" then
core.table.insert(tags, "route_name:" .. entry.route_name)
elseif entry.route_id and entry.route_id ~= "" then
core.table.insert(tags, "route_name:" .. entry.route_id)
end
if entry.service_id and entry.service_id ~= "" then
- core.table.insert(tags, "service_id:" .. entry.service_id)
+ local svc_id = entry.service_id
+
+ if entry.prefer_name then
+ local svc = service_fetch(svc_id)
Review comment:
Thanks for pointing it out. Since everything is hot loaded it could be a
mess. Updating.
--
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]