You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/06/16 09:07:33 UTC

[GitHub] [apisix] jagerzhang commented on issue #7239: help request: 插件 request-id 与 opentelemetry 结合

jagerzhang commented on issue #7239:
URL: https://github.com/apache/apisix/issues/7239#issuecomment-1157419406

   看了下2.11版本的插件优先级:
   ```
   client-control 22000
   ext-plugin-pre-req 12000
   zipkin 11011
   request-id 11010
   fault-injection 11000
   serverless-pre-function 10000
   batch-requests 4010
   cors 4000
   ip-restriction 3000
   ua-restriction 2999
   referer-restriction 2990
   uri-blocker 2900
   request-validation 2800
   openid-connect 2599
   wolf-rbac 2555
   hmac-auth 2530
   basic-auth 2520
   jwt-auth 2510
   key-auth 2500
   consumer-restriction 2400
   authz-keycloak 2000
   proxy-mirror 1010
   proxy-cache 1009
   proxy-rewrite 1008
   api-breaker 1005
   limit-conn 1003
   limit-count-by-client 1002
   limit-count 1002
   limit-req 1001
   gzip 995
   server-info 990
   traffic-split 966
   redirect 900
   response-rewrite 899
   trpc-transcode 677
   grpc-transcode 506
   zhiyan-log 504
   prometheus 500
   echo 412
   http-logger 410
   skywalking-logger 408
   sls-logger 406
   tcp-logger 405
   kafka-logger 403
   syslog 401
   udp-logger 400
   opentelemetry -1200 -- last running plugin, but before serverless post func
   serverless-post-function -2000
   ext-plugin-post-req -3000
   ```
   requests-id的执行阶段是比较靠前的,不过看最新的代码,opentelemetry 的优先级由-1200改为12009,排到了第二位:
   https://github.com/apache/apisix/blob/70ba952ef7123b463af219a036548aa8721255b4/apisix/plugins/opentelemetry.lua#L179
   https://github.com/apache/apisix/blob/70ba952ef7123b463af219a036548aa8721255b4/apisix/plugins/request-id.lua#L67
   
   所以@[shuqingzai](https://github.com/shuqingzai) 你只需要改下插件代码里面的 priority 就能改变这个执行阶段顺序。


-- 
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: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org