You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by sp...@apache.org on 2022/08/17 09:29:08 UTC

[apisix] 06/12: fix: adjust the execution priority of request-id to fix opentelemetry has no request id (#7281)

This is an automated email from the ASF dual-hosted git repository.

spacewander pushed a commit to branch release/2.13
in repository https://gitbox.apache.org/repos/asf/apisix.git

commit 871aface63a5b268fe6f1a28530e0eba590c9a36
Author: Jager <im...@zhang.ge>
AuthorDate: Wed Jun 22 18:04:04 2022 +0800

    fix: adjust the execution priority of request-id to fix opentelemetry has no request id (#7281)
    
    Co-authored-by: Jagerzhang <ja...@tencent.com>
---
 apisix/plugins/request-id.lua | 2 +-
 conf/config-default.yaml      | 2 +-
 t/admin/plugins.t             | 2 +-
 t/debug/debug-mode.t          | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/apisix/plugins/request-id.lua b/apisix/plugins/request-id.lua
index 183374e8f..062ef4513 100644
--- a/apisix/plugins/request-id.lua
+++ b/apisix/plugins/request-id.lua
@@ -63,7 +63,7 @@ local attr_schema = {
 
 local _M = {
     version = 0.1,
-    priority = 11010,
+    priority = 12015,
     name = plugin_name,
     schema = schema
 }
diff --git a/conf/config-default.yaml b/conf/config-default.yaml
index d42ff2151..f9be1c0b5 100644
--- a/conf/config-default.yaml
+++ b/conf/config-default.yaml
@@ -325,11 +325,11 @@ plugins:                          # plugin list (sorted by priority)
   - real-ip                        # priority: 23000
   - client-control                 # priority: 22000
   - proxy-control                  # priority: 21990
+  - request-id                     # priority: 12015
   - zipkin                         # priority: 12011
   #- skywalking                    # priority: 12010
   #- opentelemetry                 # priority: 12009
   - ext-plugin-pre-req             # priority: 12000
-  - request-id                     # priority: 11010
   - fault-injection                # priority: 11000
   - mocking                        # priority: 10900
   - serverless-pre-function        # priority: 10000
diff --git a/t/admin/plugins.t b/t/admin/plugins.t
index 2cd06c809..fc6531378 100644
--- a/t/admin/plugins.t
+++ b/t/admin/plugins.t
@@ -64,9 +64,9 @@ __DATA__
 real-ip
 client-control
 proxy-control
+request-id
 zipkin
 ext-plugin-pre-req
-request-id
 fault-injection
 mocking
 serverless-pre-function
diff --git a/t/debug/debug-mode.t b/t/debug/debug-mode.t
index d2f629d8e..0fe20a8bb 100644
--- a/t/debug/debug-mode.t
+++ b/t/debug/debug-mode.t
@@ -43,9 +43,9 @@ done
 --- error_log
 loaded plugin and sort by priority: 23000 name: real-ip
 loaded plugin and sort by priority: 22000 name: client-control
+loaded plugin and sort by priority: 12015 name: request-id
 loaded plugin and sort by priority: 12011 name: zipkin
 loaded plugin and sort by priority: 12000 name: ext-plugin-pre-req
-loaded plugin and sort by priority: 11010 name: request-id
 loaded plugin and sort by priority: 11000 name: fault-injection
 loaded plugin and sort by priority: 10000 name: serverless-pre-function
 loaded plugin and sort by priority: 4000 name: cors