bai-ming opened a new issue, #11266:
URL: https://github.com/apache/apisix/issues/11266

   ### Description
   
   I want to create a root span by x-request-id.
   my config is :
   ```
   opentelemetry:
       trace_id_source: x-request-id
       resource:
         service.name: APISIX
       collector:
         address: 10.142.0.35:4318
         request_timeout: 3
         request_headers:
           Authorization: token
       batch_span_processor:
         drop_on_queue_full: false
         max_queue_size: 1024
         batch_timeout: 2
         inactive_timeout: 1
         max_export_batch_size: 16
   ```
   bug when i open the opentelemetry plugin in the route, the trace_id doesn't 
equal x-request-id but traceparent.
   I find the code in apisix/plugins/opentelemetry.lua,
   ```
   local upstream_context = trace_context_propagator:extract(context, ngx.req)
   ```
   In the OpenResty , the ngx.req is only read,so I can not change the header 
of req.
   So what can i do to ignore the traceparent in the request header?
   
   ### Environment
   
   - APISIX version (run `apisix version`): 3.9.0
   - Operating system (run `uname -a`): Linux eb-apisix-deploy-79c5f88c84-5r8v7 
4.15.0-212-generic #223-Ubuntu SMP Tue May 23 13:09:22 UTC 2023 x86_64 x86_64 
x86_64 GNU/Linux
   - OpenResty / Nginx version (run `openresty -V` or `nginx -V`): 
openresty/1.25.3.1
   - etcd version, if relevant (run `curl 
http://127.0.0.1:9090/v1/server_info`):3.5.0
   


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

Reply via email to