spacewander commented on code in PR #7822:
URL: https://github.com/apache/apisix/pull/7822#discussion_r962304595
##########
Makefile:
##########
@@ -460,3 +468,17 @@ ci-env-down:
@$(call func_echo_status, "$@ -> [ Start ]")
$(ENV_DOCKER_COMPOSE) down
@$(call func_echo_success_status, "$@ -> [ Done ]")
+
+
+### eclint: Validate files against editorconfig
Review Comment:
Could you move the dev kit stuff to a separate PR? Thanks!
##########
apisix/plugins/opentelemetry.lua:
##########
@@ -169,6 +169,13 @@ local schema = {
type = "string",
minLength = 1,
}
+ },
+ additional_header_attributes = {
Review Comment:
Better to rename this conf to show it is used for prefix. Otherwise, people
will ask why `additional_attributes` can use `http_header` but we have another
conf called additional_header_attributes.
##########
apisix/plugins/opentelemetry.lua:
##########
@@ -273,6 +280,27 @@ local function create_tracer_obj(conf)
end
+local function inject_attributes(attributes, wanted_attributes, source,
with_prefix)
+ for _, key in ipairs(wanted_attributes) do
+ local is_key_a_match = #key >= 2 and key:sub(-1, -1) == "*" and
with_prefix
Review Comment:
`key:sub(-1, -1)`
Would be better to use `:byte`?
--
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]