Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

help request: Cannot use opentelemetry collect monitor data and get error: nginx: [emerg] unknown "opentelemetry_context_traceparent" variable #11632

Open
ahululu opened this issue Oct 9, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@ahululu
Copy link

ahululu commented Oct 9, 2024

Description

  • My Helm Values.yaml
plugins:
  - opentelemetry

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"
  • update chart and get error
❯ 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


Environment

  • APISIX version (run apisix version): kubernetes , apache/apisix:3.3.0-debian
  • 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):
@dosubot dosubot bot added the bug Something isn't working label Oct 9, 2024
@ahululu
Copy link
Author

ahululu commented Oct 10, 2024

Preliminary findings are related to the apisix version。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: 📋 Backlog
Development

No branches or pull requests

1 participant