-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix parent endpoint and peer in segment ref and tag url in entry span. #63
Conversation
jmjoy
commented
Mar 31, 2023
•
edited
Loading
edited
- Fix parent endpoint and peer in segment ref. In the past, the parent endpoint and peer of the sw8 header uses the endpoint and peer of the exit span by mistake (but it does not seem to affect the display of tracing on the UI).
- Fix tag url in entry span.
It does when you check endpoint dependencies(endpoint dashboard). The graph would be totally wrong. |
You could use this page to verify the result. http://demo.skywalking.apache.org/dashboard/GENERAL/Endpoint/YWdlbnQ6OnJlY29tbWVuZGF0aW9u.1/YWdlbnQ6OnJlY29tbWVuZGF0aW9u.1_L3JjbWQ=/General-Endpoint/tab/1 Of course, the e2e verification works too. |
src/plugin/plugin_curl.rs
Outdated
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(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or sometimes, the plugin doesn't cover the entry. So, only the current exit span with some local spans left.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now PHP trace always start from HTTP requests, so the entry span will exist, I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just suggest maybe it is better to add a method to retrieve the endpoint(looking for entrySpan's) rather than hard-coding this everywhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, I has switch to use get_primary_span
method.
How I test it in my personal UI, and it works. |