Re: [I] bug: openelemetry set_ngx_var option causes errors [apisix]

2025-07-15 Thread via GitHub


Baoyuantop closed issue #12402: bug: openelemetry set_ngx_var option causes 
errors
URL: https://github.com/apache/apisix/issues/12402


-- 
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]



Re: [I] bug: openelemetry set_ngx_var option causes errors [apisix]

2025-07-09 Thread via GitHub


Baoyuantop commented on issue #12402:
URL: https://github.com/apache/apisix/issues/12402#issuecomment-3051575814

   We will remove the set_ngx_var attribute in plugin_attr and use plugin 
metadata configuration uniformly.


-- 
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]



Re: [I] bug: openelemetry set_ngx_var option causes errors [apisix]

2025-07-06 Thread via GitHub


nvx commented on issue #12402:
URL: https://github.com/apache/apisix/issues/12402#issuecomment-3043292024

   Re-adding the old style `plugin_attr` config to the `config.yaml` (in 
addition to keeping the plugin metadata config with `set_ngx_var` set to true) 
works around the issue:
   
   ```
   plugin_attr:
 opentelemetry:
   set_ngx_var: true
   ```


-- 
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]



[I] bug: openelemetry set_ngx_var option causes errors [apisix]

2025-07-06 Thread via GitHub


nvx opened a new issue, #12402:
URL: https://github.com/apache/apisix/issues/12402

   ### Current Behavior
   
   When enabling `set_ngx_var` in the opentelemetry plugin apisix errors out 
during startup.
   
   This worked prior to PR #11940. Looking at 
https://github.com/apache/apisix/blob/3.13.0/apisix/cli/ops.lua#L554 it appears 
that the part of the code to setup the required nginx variable wasn't migrated 
to use plugin metadata and is still using plugin attributes.
   
   ### Expected Behavior
   
   _No response_
   
   ### Error Logs
   
   ```
   "2025/07/07 01:32:59 [error] 38#38: *291 lua entry thread aborted: runtime 
error: /usr/local/apisix/apisix/plugins/opentelemetry.lua:374: variable 
"opentelemetry_context_traceparent" not found for writing; maybe it is a 
built-in variable that is not changeable or you forgot to use "set 
$opentelemetry_context_traceparent '';" in the config file to define it first"
   ```
   
   ### Steps to Reproduce
   
   Enable the opentelemetry plugin and set the following plugin metadata
   
   ```
   "plugin_metadata":
 - "collector":
 "address": "127.0.0.1:4318"
 "request_timeout": 3
   "id": "opentelemetry"
   "set_ngx_var": true
   ```
   
   ### Environment
   
   - APISIX version (run `apisix version`): apache/apisix:3.13.0-debian
   - Operating system (run `uname -a`): Linux/Docker
   - OpenResty / Nginx version (run `openresty -V` or `nginx -V`): as per 
docker image
   - LuaRocks version, for installation issues (run `luarocks --version`): as 
per docker image
   


-- 
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]