-
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-30349 Add open telemetry support to esp #17838
Conversation
https://track.hpccsystems.com/browse/HPCC-30349 |
https://track.hpccsystems.com/browse/HPCC-30349 |
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.
@ghalliday looks good, some comments.
if(callerId.length()) | ||
m_context->setCallerId(callerId); | ||
|
||
//MORE: The previous code would be better off querying httpHeaders... |
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.
Yes at some point we could look at using IProperties inside CHttpRequest/Message.
@ghalliday I think as a follow on to instrumenting roxie/thor and esp we should consider some quick win attributes to the spans that may be very helpful. We'll probably enhance them greatly over time.. but some quick wins like general status of the span for example. Any exception that caused the span to end would be very useful. |
d1c48cd
to
3564608
Compare
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.
@ghalliday a couple of comments
|
||
//MORE: The previous code would be better off querying httpHeaders... | ||
Owned<IProperties> httpHeaders = getHeadersAsProperties(m_headers); | ||
Owned<ISpan> requestSpan = queryTraceManager().createServerSpan("request", httpHeaders, SpanFlags::EnsureGlobalId); |
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 believe there's a createServerSpan which accepts StringArray, unless we're reusing IProperties httpHeaders, I'd lean towards utilizing createServerSpan (..., StringArray,...)
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 think it is likely the rest of the code would be better using an IProperties - so I will leave.
ISpan * activeSpan = context.queryActiveSpan(); | ||
if (activeSpan) | ||
clientSpan.setown(activeSpan->createClientSpan("soapcall")); | ||
|
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 an else condition possible?
if so, no 'soapcall' tracing in the else condition?
Otherwise, do we even need the if?
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.
There may be no span if the request comes through on a protocol that doesn't support it. We should be creating server spans in those cases as well, but until we can guarantee they are all covered it is safer to check 1st.
system/jlib/jtrace.cpp
Outdated
if (!isEmptyString(hpccGlobalId.get())) | ||
ctxProps->setProp(kGlobalIdHttpHeaderName, hpccGlobalId.get()); | ||
const char * globalId = queryGlobalId(); | ||
ctxProps->setNonEmptyProp(kGlobalIdHttpHeaderName, globalId); |
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.
Trivial, but I think you could now get rid of the variable globalId and write:
ctxProps->setNonEmptyProp(kGlobalIdHttpHeaderName, queryGlobalId());
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.
Approved, but one trivial comment that could get rid of a variable.
e077382
to
b342396
Compare
Signed-off-by: Gavin Halliday <[email protected]>
b342396
to
edd96ce
Compare
Type of change:
Checklist:
Smoketest:
Testing: