You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by "wu-sheng (via GitHub)" <gi...@apache.org> on 2023/04/01 06:01:01 UTC

[GitHub] [skywalking-php] wu-sheng commented on a diff in pull request #63: Fix parent endpoint and peer in segment ref.

wu-sheng commented on code in PR #63:
URL: https://github.com/apache/skywalking-php/pull/63#discussion_r1155063217


##########
src/plugin/plugin_curl.rs:
##########
@@ -404,8 +404,13 @@ impl CurlPlugin {
     }
 
     fn inject_sw_header(request_id: Option<i64>, ch: ZVal, info: &CurlInfo) -> crate::Result<()> {
-        let sw_header = RequestContext::try_with_global_ctx(request_id, |ctx| {
-            Ok(encode_propagation(ctx, info.url.path(), &info.peer))
+        let sw_header = RequestContext::try_with_global(request_id, |req_ctx| {
+            let span_object = req_ctx.entry_span.span_object();

Review Comment:
   Is there any case the entry_span is null? Usually, in Java practice. we would pick the first entry span, if it can't be found, we fall back to the first span. This is usually happens this trace starts from a timer/scheduler.



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

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