Open ahululu opened 1 week ago
plugins:
pluginAttrs: opentelemetry: set_ngx_var: true resource: service: name: APISIX tenant: id: business_id collector: address: datadog.default.svc.cluster.local:4318 request_timeout: 3 request_headers: foo: bar batch_span_processor: drop_on_queue_full: false max_queue_size: 6 batch_timeout: 2 inactive_timeout: 1 max_export_batch_size: 2
logs:
enableAccessLog: true
accessLog: "/dev/stdout"
accessLogFormat: '$opentelemetry_context_traceparent $opentelemetry_trace_id $opentelemetry_span_id $remote_addr - $remote_user [$time_local] $http_host \"$request\" $status $body_bytes_sent $request_time \"$http_referer\" \"$http_user_agent\" $upstream_addr $upstream_status $upstream_response_time \"$upstream_scheme://$upstream_host$upstream_uri\"'
accessLogFormatEscape: default
errorLog: "/dev/stderr"
errorLogLevel: "warn"
- update chart and get error ```bash ❯ kubectl logs -f apisix-perf-test-xx-sdbzj Defaulted container "apisix" out of: apisix, wait-etcd (init), init-sysctl (init) /usr/local/openresty//luajit/bin/luajit ./apisix/cli/apisix.lua init WARNING: using fixed Admin API token has security risk. Please modify "admin_key" in conf/config.yaml . /usr/local/openresty//luajit/bin/luajit ./apisix/cli/apisix.lua init_etcd 2024/10/09 10:54:26 [warn] 1#1: low address bits of 127.0.0.1/24 are meaningless in /usr/local/apisix/conf/nginx.conf:272 nginx: [warn] low address bits of 127.0.0.1/24 are meaningless in /usr/local/apisix/conf/nginx.conf:272 2024/10/09 10:54:26 [emerg] 1#1: unknown "opentelemetry_context_traceparent" variable nginx: [emerg] unknown "opentelemetry_context_traceparent" variable
apisix version
uname -a
openresty -V
nginx -V
curl http://127.0.0.1:9090/v1/server_info
luarocks --version
Preliminary findings are related to the apisix version。
the variables of otel were introduced starting from version 3.6.0.
https://github.com/apache/apisix/blob/master/CHANGELOG.md#360
Description
plugins:
pluginAttrs: opentelemetry: set_ngx_var: true resource: service: name: APISIX tenant: id: business_id collector: address: datadog.default.svc.cluster.local:4318 request_timeout: 3 request_headers: foo: bar batch_span_processor: drop_on_queue_full: false max_queue_size: 6 batch_timeout: 2 inactive_timeout: 1 max_export_batch_size: 2
logs:
-- Enable access log or not, default true
enableAccessLog: true
-- Access log path
accessLog: "/dev/stdout"
-- Access log format
accessLogFormat: '$opentelemetry_context_traceparent $opentelemetry_trace_id $opentelemetry_span_id $remote_addr - $remote_user [$time_local] $http_host \"$request\" $status $body_bytes_sent $request_time \"$http_referer\" \"$http_user_agent\" $upstream_addr $upstream_status $upstream_response_time \"$upstream_scheme://$upstream_host$upstream_uri\"'
-- Allows setting json or default characters escaping in variables
accessLogFormatEscape: default
-- Error log path
errorLog: "/dev/stderr"
-- Error log level
errorLogLevel: "warn"
Environment
apisix version
): kubernetes , apache/apisix:3.3.0-debianuname -a
):openresty -V
ornginx -V
):curl http://127.0.0.1:9090/v1/server_info
):luarocks --version
):