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/09/20 13:02:32 UTC

[GitHub] [apisix] wzbwzt opened a new issue, #7953: feat: As a user, I want to ..., so that ...

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

   ### Description
   
   Apisix中配置plugin runner,并将执行插件安装在ext-plugin-pre-req,当在runner 插件中添加trace时,无法关联apisix的内置zipkin 插件,根据其执行阶段和执行权重,建议将zipkin.lua中的access阶段的send headers to upstream 放入到rewrite阶段中;
   
   function _M.rewrite(plugin_conf, ctx)
   		....
   		local request_span = ctx.opentracing.request_span
   		    if conf.span_version == ZIPKIN_SPAN_VER_1 then
   		        ctx.opentracing.rewrite_span = request_span:start_child_span("apisix.rewrite",
   		            start_timestamp)
   		
   		        ctx.REWRITE_END_TIME = tracer:time()
   		        ctx.opentracing.rewrite_span:finish(ctx.REWRITE_END_TIME)
   		    else
   		        ctx.opentracing.proxy_span = request_span:start_child_span("apisix.proxy",
   		            start_timestamp)
   		
   		        -- send headers to upstream
   		        local outgoing_headers = {}
   		        tracer:inject(ctx.opentracing.proxy_span, "http_headers", outgoing_headers)
   		        for k, v in pairs(outgoing_headers) do
   		            core.request.set_header(ctx, k, v)
   		        end
   		    end
   		end


-- 
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.apache.org

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


[GitHub] [apisix] spacewander commented on issue #7953: feat: trace in ext-plugin-pre-req can't connect to zipkin's (built-in plugin) trace

Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #7953:
URL: https://github.com/apache/apisix/issues/7953#issuecomment-1253204263

   What about switching to ext-plugin-post-req, as the header injection is done after ext-plugin-pre-req?


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


[GitHub] [apisix] github-actions[bot] commented on issue #7953: feat: trace in ext-plugin-pre-req can't connect to zipkin's (built-in plugin) trace

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #7953:
URL: https://github.com/apache/apisix/issues/7953#issuecomment-1713574578

   This issue has been marked as stale due to 350 days of inactivity. It will be closed in 2 weeks if no further activity occurs. If this issue is still relevant, please simply write any comment. Even if closed, you can still revive the issue at any time or discuss it on the dev@apisix.apache.org list. Thank you for your contributions.


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


[GitHub] [apisix] tzssangglass commented on issue #7953: feat: trace in ext-plugin-pre-req can't connect to zipkin's (built-in plugin) trace

Posted by GitBox <gi...@apache.org>.
tzssangglass commented on issue #7953:
URL: https://github.com/apache/apisix/issues/7953#issuecomment-1252362247

   > Apisix中配置plugin runner,并将执行插件安装在ext-plugin-pre-req,当在runner 插件中添加trace时
   
   I don't understand what these steps are, can you expand on them?


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


[GitHub] [apisix] spacewander commented on issue #7953: feat: trace in ext-plugin-pre-req can't connect to zipkin's (built-in plugin) trace

Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #7953:
URL: https://github.com/apache/apisix/issues/7953#issuecomment-1253672886

   You can use both, see https://github.com/apache/apisix/blob/efd5d1ec21cd1a756eaba345fe2357e54a2b721a/t/plugin/ext-plugin/sanity.t#L84.
   
   ext-plugin-pre-req and ext-plugin-post-req can have different configurations.


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


[GitHub] [apisix] wzbwzt commented on issue #7953: feat: trace in ext-plugin-pre-req can't connect to zipkin's (built-in plugin) trace

Posted by GitBox <gi...@apache.org>.
wzbwzt commented on issue #7953:
URL: https://github.com/apache/apisix/issues/7953#issuecomment-1253339266

   > What about switching to ext-plugin-post-req, as the header injection is done after ext-plugin-pre-req?
   
   yes, however we want plugin runner executed before most of the APISIX built-in plugins, ext-plugin-pre-req execute in access phase and has a very low priority.  if we change zipkin header injection from access phase to rewrite phase,will there be any other impact? has a litter worry about 😟 
   
   


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


[GitHub] [apisix] github-actions[bot] commented on issue #7953: feat: trace in ext-plugin-pre-req can't connect to zipkin's (built-in plugin) trace

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #7953:
URL: https://github.com/apache/apisix/issues/7953#issuecomment-1733354751

   This issue has been closed due to lack of activity. If you think that is incorrect, or the issue requires additional review, you can revive the issue at any time.


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


[GitHub] [apisix] github-actions[bot] closed issue #7953: feat: trace in ext-plugin-pre-req can't connect to zipkin's (built-in plugin) trace

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #7953: feat: trace in  ext-plugin-pre-req can't connect to zipkin's (built-in plugin) trace
URL: https://github.com/apache/apisix/issues/7953


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