-
Notifications
You must be signed in to change notification settings - Fork 304
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
HPCC-31570 SoapCall to propagate client span headers #18522
HPCC-31570 SoapCall to propagate client span headers #18522
Conversation
Jira Issue: https://hpccsystems.atlassian.net//browse/HPCC-31570 Jirabot Action Result: |
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.
@rpastrana a couple of comments.
common/thorhelper/thorsoapcall.cpp
Outdated
@@ -2563,6 +2561,11 @@ class CWSCAsyncFor : implements IWSCAsyncFor, public CInterface, public CAsyncFo | |||
checkRoxieAbortMonitor(master->roxieAbortMonitor); | |||
OwnedSpanScope socketOperationSpan = master->activitySpanScope->createClientSpan("Socket Write"); | |||
setSpanURLAttributes(socketOperationSpan, url); | |||
if (isEmptyString(request)) |
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.
If you are creating a spans for each retry then you will need to recreate the request each time - otherwise the parent span will be wrong. (Move the definition of request to here at the same time.)
(I don't think there is a problem if you do, the common case is to succeed.)
common/thorhelper/thorsoapcall.cpp
Outdated
@@ -1958,7 +1958,7 @@ class CWSCAsyncFor : implements IWSCAsyncFor, public CInterface, public CAsyncFo | |||
} | |||
} | |||
|
|||
void createHttpRequest(Url &url, StringBuffer &request) | |||
void createHttpRequest(Url &url, StringBuffer &request, IProperties * traceHeaders) |
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.
Very confusing (existing) parameters. The first parameter should be const it is input only - in which case your new parameter should come before the output parameter. (Output parameters should either be at the start of the list or the end, not in the middle.)
- New method param allows trace headers passed in to http request - Supplies client span trace header - Delays http req creation after client span - Ensures client span lifespan remains as tight as possible - Re-orders createHttpRequest params - Declares const param Signed-off-by: Rodrigo Pastrana <[email protected]>
b8d39ad
to
aa5bf04
Compare
Type of change:
Checklist:
Smoketest:
Testing: