From 6aa073fc948a3ddebe42c8bc0e570db02790df47 Mon Sep 17 00:00:00 2001 From: James McMullan Date: Mon, 25 Nov 2024 15:17:23 -0500 Subject: [PATCH 1/4] HPCC-32248 Add tracing to rowservice - Added opentelemetry tracing to rowservice Signed-off-by: James McMullan James.McMullan@lexisnexis.com --- fs/dafilesrv/dafilesrv.cpp | 31 +++++++- fs/dafsserver/dafsserver.cpp | 140 ++++++++++++++++++++++++++++++++++- 2 files changed, 165 insertions(+), 6 deletions(-) diff --git a/fs/dafilesrv/dafilesrv.cpp b/fs/dafilesrv/dafilesrv.cpp index ffe2e689aea..5348917fd04 100644 --- a/fs/dafilesrv/dafilesrv.cpp +++ b/fs/dafilesrv/dafilesrv.cpp @@ -366,6 +366,23 @@ version: 1.0 detail: 100 )!!"; +IPropertyTree * loadConfigurationWithGlobalDefault(const char * defaultYaml, Owned& globalConfig, const char * * argv, const char * componentTag, const char * envPrefix) +{ + Owned componentDefault; + if (defaultYaml) + { + Owned defaultConfig = createPTreeFromYAMLString(defaultYaml, 0, ptr_ignoreWhiteSpace, nullptr); + componentDefault.set(defaultConfig->queryPropTree(componentTag)); + if (!componentDefault) + throw makeStringExceptionV(99, "Default configuration does not contain the tag %s", componentTag); + } + else + componentDefault.setown(createPTree(componentTag)); + + mergePTree(componentDefault, globalConfig); + + return loadConfiguration(componentDefault, argv, componentTag, envPrefix, nullptr, nullptr); +} int main(int argc, const char* argv[]) { @@ -373,6 +390,7 @@ int main(int argc, const char* argv[]) EnableSEHtoExceptionMapping(); #ifndef __64BIT__ + // Restrict stack sizes on 32-bit systems Thread::setDefaultStackSize(0x10000); // 64K stack (also set in windows DSP) #endif @@ -386,7 +404,17 @@ int main(int argc, const char* argv[]) StringBuffer componentName; // NB: bare-metal dafilesrv does not have a component specific xml - Owned config = loadConfiguration(defaultYaml, argv, "dafilesrv", "DAFILESRV", nullptr, nullptr); + Owned extractedGlobalConfig = createPTree("dafilesrv"); + +#ifndef _CONTAINERIZED + Owned env = getHPCCEnvironment(); + IPropertyTree* globalTracing = env->queryPropTree("Software/tracing"); + if (globalTracing != nullptr) + extractedGlobalConfig->addPropTree("tracing", globalTracing); +#endif + + // NB: bare-metal dafilesrv does not have a component specific xml, extracting relevant global configuration instead + Owned config = loadConfigurationWithGlobalDefault(defaultYaml, extractedGlobalConfig, argv, "dafilesrv", "DAFILESRV"); Owned keyPairInfo; // NB: not used in containerized mode // Get SSL Settings @@ -513,7 +541,6 @@ int main(int argc, const char* argv[]) IPropertyTree *dafileSrvInstance = nullptr; #ifndef _CONTAINERIZED - Owned env = getHPCCEnvironment(); Owned _dafileSrvInstance; if (env) { diff --git a/fs/dafsserver/dafsserver.cpp b/fs/dafsserver/dafsserver.cpp index a2311f52be4..eec9ba5a1f0 100644 --- a/fs/dafsserver/dafsserver.cpp +++ b/fs/dafsserver/dafsserver.cpp @@ -162,6 +162,69 @@ static ISecureSocket *createSecureSocket(ISocket *sock, bool disableClientCertVe } #endif +//------------------------------------------------------------------------------ +// ActiveSpanScope Design Notes: +//------------------------------------------------------------------------------ +// ActiveSpanScope updates the threadActiveSpan when it is intstantiated +// and restores it to a user configurable previous ISpan when it leaves scope. +// ActiveSpanScope does not control its referenced ISpan's lifetime or ending. +// +// This design allows ActiveSpanScope to be used to update threadActiveSpan +// for long running ISpans that are time sliced, worked on from multiple threads, +// and / or passed between threads. In these cases multiple ActiveSpanScopes +// will be created over the lifetime of the referenced of the ISpan to represent +// a slice of work done towards that ISpan. +// +// Allowing the previous / restored ISpan to be configured allows for +// "disconnected" work on ISpans to be done. Where the previously active ISpan +// may not be the correct ISpan to restore when an ActiveSpanScope leaves scope. +// +// When an ActiveSpanScope is destroyed it will return the prevSpan to active, +// if and only if its span is still the threadActiveSpan. If this is not this +// implies that there is a conflicting ActiveSpanScope and that a code structure +// issue exists that needs to be addressed. A IERRLOG message will be added +// in debug builds for these cases. +//------------------------------------------------------------------------------ + +class ActiveSpanScope +{ +public: + // Captures current threadActiveSpan for prevSpan + ActiveSpanScope(ISpan * _ptr) : ActiveSpanScope(_ptr, queryThreadedActiveSpan()) {} + ActiveSpanScope(ISpan * _ptr, ISpan * _prev) : span(_ptr), prevSpan(_prev) + { + setThreadedActiveSpan(_ptr); + } + ActiveSpanScope(const ActiveSpanScope& rhs) = delete; + + ~ActiveSpanScope() + { + ISpan* current = queryThreadedActiveSpan(); + if (current != span) + { + const char* currSpanID = current != nullptr ? current->querySpanId() : "null"; + const char* expectedSpanID = span != nullptr ? span->querySpanId() : "null"; + + IERRLOG("~ActiveSpanScope: threadActiveSpan has changed unexpectedly, expected: %s actual: %s", expectedSpanID, currSpanID); + return; + } + + setThreadedActiveSpan(prevSpan); + } + + inline ISpan * operator -> () const { return span; } + inline operator ISpan *() const { return span; } + + inline ActiveSpanScope& operator=(ISpan * ptr) = delete; + inline ActiveSpanScope& operator=(const ActiveSpanScope& rhs) = delete; + + inline bool operator == (ISpan * _ptr) const { return span == _ptr; } + inline bool operator != (ISpan * _ptr) const { return span != _ptr; } +private: + ISpan * span = nullptr; + ISpan * prevSpan = nullptr; +}; + static void reportFailedSecureAccepts(const char *context, IException *exception, unsigned &numFailedConn, unsigned &timeLastLog) { numFailedConn++; @@ -839,6 +902,9 @@ class CRemoteRequest : public CSimpleInterfaceOf MemoryBuffer expandMb; Owned responseWriter; // for xml or json response + Owned requestSpan; + std::string requestTraceParent; + bool handleFull(MemoryBuffer &inMb, size32_t inPos, MemoryBuffer &compressMb, ICompressor *compressor, size32_t replyLimit, size32_t &totalSz) { size32_t sz = inMb.length()-inPos; @@ -1092,6 +1158,16 @@ class CRemoteRequest : public CSimpleInterfaceOf responseWriter->outputUInt(cursorHandle, sizeof(cursorHandle), "handle"); } } + + ~CRemoteRequest() + { + if (requestSpan != nullptr) + { + requestSpan->setSpanStatusSuccess(true); + requestSpan->endSpan(); + } + } + OutputFormat queryFormat() const { return format; } unsigned __int64 queryReplyLimit() const { return replyLimit; } IRemoteActivity *queryActivity() const { return activity; } @@ -1099,6 +1175,37 @@ class CRemoteRequest : public CSimpleInterfaceOf void process(IPropertyTree *requestTree, MemoryBuffer &restMb, MemoryBuffer &responseMb, CClientStats &stats) { + const char* fullTraceContext = requestTree->queryProp("_trace/traceparent"); + + // We only want to compare the trace-id & span-id, so remove the last "sampling" group + std::string traceParent = fullTraceContext ? fullTraceContext : ""; + traceParent = traceParent.substr(0,traceParent.find_last_of("-")); + + if (!traceParent.empty() && requestTraceParent != traceParent) + { + // Check to see if we have an existing span that needs to be closed out, this can happen + // when the span parent changes on the client side + if (requestSpan != nullptr) + { + requestSpan->setSpanStatusSuccess(true); + requestSpan->endSpan(); + } + + Owned traceHeaders = createProperties(); + traceHeaders->setProp("traceparent", fullTraceContext); + + std::string requestSpanName; + if (activity->queryIsReadActivity()) + requestSpanName = "ReadRequest"; + else + requestSpanName = "WriteRequest"; + + requestSpan.set(queryTraceManager().createServerSpan(requestSpanName.c_str(), traceHeaders)); + requestTraceParent = traceParent; + } + + ActiveSpanScope activeSpan(requestSpan.get()); + if (requestTree->hasProp("replyLimit")) replyLimit = requestTree->getPropInt64("replyLimit", defaultDaFSReplyLimitKB) * 1024; @@ -3027,12 +3134,12 @@ class CRemoteFileServer : implements IRemoteFileServer, public CInterface else { if (gc) - THROWJSOCKEXCEPTION(JSOCKERR_graceful_close); + THROWJSOCKEXCEPTION(JSOCKERR_graceful_close); break; // wait for rest via subsequent notifySelected's } } else if (gc) - THROWJSOCKEXCEPTION(JSOCKERR_graceful_close); + THROWJSOCKEXCEPTION(JSOCKERR_graceful_close); // to be here, implies handled full message, loop around to see if more on the wire. // will break out if nothing/partial. } @@ -4818,7 +4925,7 @@ class CRemoteFileServer : implements IRemoteFileServer, public CInterface * } * } * } - * + * * fetch continuation: * { * "format" : "binary", @@ -4960,8 +5067,23 @@ class CRemoteFileServer : implements IRemoteFileServer, public CInterface } case StreamCmd::CLOSE: { + OwnedSpanScope closeSpan; + const char* traceParent = requestTree->queryProp("_trace/traceparent"); + if (traceParent != nullptr) + { + Owned traceHeaders = createProperties(); + traceHeaders->setProp("traceparent", traceParent); + + closeSpan.set(queryTraceManager().createServerSpan("CloseRequest", traceHeaders)); + } + if (0 == cursorHandle) - throw createDafsException(DAFSERR_cmdstream_protocol_failure, "cursor handle not supplied to 'close' command"); + { + IException* exception = createDafsException(DAFSERR_cmdstream_protocol_failure, "cursor handle not supplied to 'close' command"); + closeSpan->recordException(exception); + throw exception; + } + IFileIO *dummy; checkFileIOHandle(cursorHandle, dummy, true); break; @@ -4990,6 +5112,16 @@ class CRemoteFileServer : implements IRemoteFileServer, public CInterface { case StreamCmd::VERSION: { + OwnedSpanScope versionSpan; + const char* traceParent = requestTree->queryProp("_trace/traceparent"); + if (traceParent != nullptr) + { + Owned traceHeaders = createProperties(); + traceHeaders->setProp("traceparent", traceParent); + + versionSpan = queryTraceManager().createServerSpan("VersionRequest", traceHeaders); + } + if (outFmt_Binary == outputFormat) reply.append(DAFILESRV_VERSIONSTRING); else From 3b0458d65a2ad607bba21be59ecb2af788daf129 Mon Sep 17 00:00:00 2001 From: James McMullan Date: Wed, 8 Jan 2025 09:19:36 -0500 Subject: [PATCH 2/4] Code review changes --- fs/dafilesrv/dafilesrv.cpp | 34 ++++++-------- fs/dafsserver/dafsserver.cpp | 90 +++++------------------------------- 2 files changed, 26 insertions(+), 98 deletions(-) diff --git a/fs/dafilesrv/dafilesrv.cpp b/fs/dafilesrv/dafilesrv.cpp index 5348917fd04..df14751b419 100644 --- a/fs/dafilesrv/dafilesrv.cpp +++ b/fs/dafilesrv/dafilesrv.cpp @@ -366,24 +366,6 @@ version: 1.0 detail: 100 )!!"; -IPropertyTree * loadConfigurationWithGlobalDefault(const char * defaultYaml, Owned& globalConfig, const char * * argv, const char * componentTag, const char * envPrefix) -{ - Owned componentDefault; - if (defaultYaml) - { - Owned defaultConfig = createPTreeFromYAMLString(defaultYaml, 0, ptr_ignoreWhiteSpace, nullptr); - componentDefault.set(defaultConfig->queryPropTree(componentTag)); - if (!componentDefault) - throw makeStringExceptionV(99, "Default configuration does not contain the tag %s", componentTag); - } - else - componentDefault.setown(createPTree(componentTag)); - - mergePTree(componentDefault, globalConfig); - - return loadConfiguration(componentDefault, argv, componentTag, envPrefix, nullptr, nullptr); -} - int main(int argc, const char* argv[]) { InitModuleObjects(); @@ -408,13 +390,25 @@ int main(int argc, const char* argv[]) #ifndef _CONTAINERIZED Owned env = getHPCCEnvironment(); - IPropertyTree* globalTracing = env->queryPropTree("Software/tracing"); + IPropertyTree* globalTracing = env->getPropTree("Software/tracing"); if (globalTracing != nullptr) extractedGlobalConfig->addPropTree("tracing", globalTracing); #endif + const char* componentTag = "dafilesrv"; + Owned componentDefault; + if (defaultYaml) + { + Owned defaultConfig = createPTreeFromYAMLString(defaultYaml, 0, ptr_ignoreWhiteSpace, nullptr); + componentDefault.set(defaultConfig->queryPropTree(componentTag)); + if (!componentDefault) + throw makeStringExceptionV(99, "Default configuration does not contain the tag %s", componentTag); + } + else + componentDefault.setown(createPTree(componentTag)); + // NB: bare-metal dafilesrv does not have a component specific xml, extracting relevant global configuration instead - Owned config = loadConfigurationWithGlobalDefault(defaultYaml, extractedGlobalConfig, argv, "dafilesrv", "DAFILESRV"); + Owned config = loadConfiguration(componentDefault, extractedGlobalConfig, argv, componentTag, "DAFILESRV", nullptr, nullptr); Owned keyPairInfo; // NB: not used in containerized mode // Get SSL Settings diff --git a/fs/dafsserver/dafsserver.cpp b/fs/dafsserver/dafsserver.cpp index eec9ba5a1f0..f634b8ed730 100644 --- a/fs/dafsserver/dafsserver.cpp +++ b/fs/dafsserver/dafsserver.cpp @@ -162,69 +162,6 @@ static ISecureSocket *createSecureSocket(ISocket *sock, bool disableClientCertVe } #endif -//------------------------------------------------------------------------------ -// ActiveSpanScope Design Notes: -//------------------------------------------------------------------------------ -// ActiveSpanScope updates the threadActiveSpan when it is intstantiated -// and restores it to a user configurable previous ISpan when it leaves scope. -// ActiveSpanScope does not control its referenced ISpan's lifetime or ending. -// -// This design allows ActiveSpanScope to be used to update threadActiveSpan -// for long running ISpans that are time sliced, worked on from multiple threads, -// and / or passed between threads. In these cases multiple ActiveSpanScopes -// will be created over the lifetime of the referenced of the ISpan to represent -// a slice of work done towards that ISpan. -// -// Allowing the previous / restored ISpan to be configured allows for -// "disconnected" work on ISpans to be done. Where the previously active ISpan -// may not be the correct ISpan to restore when an ActiveSpanScope leaves scope. -// -// When an ActiveSpanScope is destroyed it will return the prevSpan to active, -// if and only if its span is still the threadActiveSpan. If this is not this -// implies that there is a conflicting ActiveSpanScope and that a code structure -// issue exists that needs to be addressed. A IERRLOG message will be added -// in debug builds for these cases. -//------------------------------------------------------------------------------ - -class ActiveSpanScope -{ -public: - // Captures current threadActiveSpan for prevSpan - ActiveSpanScope(ISpan * _ptr) : ActiveSpanScope(_ptr, queryThreadedActiveSpan()) {} - ActiveSpanScope(ISpan * _ptr, ISpan * _prev) : span(_ptr), prevSpan(_prev) - { - setThreadedActiveSpan(_ptr); - } - ActiveSpanScope(const ActiveSpanScope& rhs) = delete; - - ~ActiveSpanScope() - { - ISpan* current = queryThreadedActiveSpan(); - if (current != span) - { - const char* currSpanID = current != nullptr ? current->querySpanId() : "null"; - const char* expectedSpanID = span != nullptr ? span->querySpanId() : "null"; - - IERRLOG("~ActiveSpanScope: threadActiveSpan has changed unexpectedly, expected: %s actual: %s", expectedSpanID, currSpanID); - return; - } - - setThreadedActiveSpan(prevSpan); - } - - inline ISpan * operator -> () const { return span; } - inline operator ISpan *() const { return span; } - - inline ActiveSpanScope& operator=(ISpan * ptr) = delete; - inline ActiveSpanScope& operator=(const ActiveSpanScope& rhs) = delete; - - inline bool operator == (ISpan * _ptr) const { return span == _ptr; } - inline bool operator != (ISpan * _ptr) const { return span != _ptr; } -private: - ISpan * span = nullptr; - ISpan * prevSpan = nullptr; -}; - static void reportFailedSecureAccepts(const char *context, IException *exception, unsigned &numFailedConn, unsigned &timeLastLog) { numFailedConn++; @@ -902,7 +839,7 @@ class CRemoteRequest : public CSimpleInterfaceOf MemoryBuffer expandMb; Owned responseWriter; // for xml or json response - Owned requestSpan; + OwnedSpanLifetime requestSpan; std::string requestTraceParent; bool handleFull(MemoryBuffer &inMb, size32_t inPos, MemoryBuffer &compressMb, ICompressor *compressor, size32_t replyLimit, size32_t &totalSz) @@ -1164,7 +1101,6 @@ class CRemoteRequest : public CSimpleInterfaceOf if (requestSpan != nullptr) { requestSpan->setSpanStatusSuccess(true); - requestSpan->endSpan(); } } @@ -1178,33 +1114,31 @@ class CRemoteRequest : public CSimpleInterfaceOf const char* fullTraceContext = requestTree->queryProp("_trace/traceparent"); // We only want to compare the trace-id & span-id, so remove the last "sampling" group - std::string traceParent = fullTraceContext ? fullTraceContext : ""; - traceParent = traceParent.substr(0,traceParent.find_last_of("-")); + const char* traceParent = fullTraceContext ? fullTraceContext : ""; + traceParent = strrchr(traceParent, '-'); - if (!traceParent.empty() && requestTraceParent != traceParent) + if (strlen(traceParent) != 0 && requestTraceParent != traceParent) { - // Check to see if we have an existing span that needs to be closed out, this can happen - // when the span parent changes on the client side + // Check to see if we have an existing span that needs to be marked successful before close if (requestSpan != nullptr) { requestSpan->setSpanStatusSuccess(true); - requestSpan->endSpan(); } Owned traceHeaders = createProperties(); traceHeaders->setProp("traceparent", fullTraceContext); - std::string requestSpanName; + const char* requestSpanName = nullptr; if (activity->queryIsReadActivity()) requestSpanName = "ReadRequest"; else requestSpanName = "WriteRequest"; - requestSpan.set(queryTraceManager().createServerSpan(requestSpanName.c_str(), traceHeaders)); + requestSpan.set(queryTraceManager().createServerSpan(requestSpanName, traceHeaders)); requestTraceParent = traceParent; } - ActiveSpanScope activeSpan(requestSpan.get()); + ActiveSpanScope activeSpan(requestSpan.query()); if (requestTree->hasProp("replyLimit")) replyLimit = requestTree->getPropInt64("replyLimit", defaultDaFSReplyLimitKB) * 1024; @@ -5067,7 +5001,7 @@ class CRemoteFileServer : implements IRemoteFileServer, public CInterface } case StreamCmd::CLOSE: { - OwnedSpanScope closeSpan; + OwnedActiveSpanScope closeSpan; const char* traceParent = requestTree->queryProp("_trace/traceparent"); if (traceParent != nullptr) { @@ -5079,7 +5013,7 @@ class CRemoteFileServer : implements IRemoteFileServer, public CInterface if (0 == cursorHandle) { - IException* exception = createDafsException(DAFSERR_cmdstream_protocol_failure, "cursor handle not supplied to 'close' command"); + IDAFS_Exception* exception = createDafsException(DAFSERR_cmdstream_protocol_failure, "cursor handle not supplied to 'close' command"); closeSpan->recordException(exception); throw exception; } @@ -5112,14 +5046,14 @@ class CRemoteFileServer : implements IRemoteFileServer, public CInterface { case StreamCmd::VERSION: { - OwnedSpanScope versionSpan; + OwnedActiveSpanScope versionSpan; const char* traceParent = requestTree->queryProp("_trace/traceparent"); if (traceParent != nullptr) { Owned traceHeaders = createProperties(); traceHeaders->setProp("traceparent", traceParent); - versionSpan = queryTraceManager().createServerSpan("VersionRequest", traceHeaders); + versionSpan.set(queryTraceManager().createServerSpan("VersionRequest", traceHeaders)); } if (outFmt_Binary == outputFormat) From a007e253757dd0c0b74e27a558f4236fcc9bbb0a Mon Sep 17 00:00:00 2001 From: James McMullan Date: Fri, 10 Jan 2025 08:46:33 -0500 Subject: [PATCH 3/4] Code review changes --- fs/dafilesrv/dafilesrv.cpp | 13 ++----------- fs/dafsserver/dafsserver.cpp | 13 ++++++------- 2 files changed, 8 insertions(+), 18 deletions(-) diff --git a/fs/dafilesrv/dafilesrv.cpp b/fs/dafilesrv/dafilesrv.cpp index df14751b419..40490def080 100644 --- a/fs/dafilesrv/dafilesrv.cpp +++ b/fs/dafilesrv/dafilesrv.cpp @@ -372,7 +372,6 @@ int main(int argc, const char* argv[]) EnableSEHtoExceptionMapping(); #ifndef __64BIT__ - // Restrict stack sizes on 32-bit systems Thread::setDefaultStackSize(0x10000); // 64K stack (also set in windows DSP) #endif @@ -396,16 +395,8 @@ int main(int argc, const char* argv[]) #endif const char* componentTag = "dafilesrv"; - Owned componentDefault; - if (defaultYaml) - { - Owned defaultConfig = createPTreeFromYAMLString(defaultYaml, 0, ptr_ignoreWhiteSpace, nullptr); - componentDefault.set(defaultConfig->queryPropTree(componentTag)); - if (!componentDefault) - throw makeStringExceptionV(99, "Default configuration does not contain the tag %s", componentTag); - } - else - componentDefault.setown(createPTree(componentTag)); + Owned defaultConfig = createPTreeFromYAMLString(defaultYaml, 0, ptr_ignoreWhiteSpace, nullptr); + Owned componentDefault(defaultConfig->queryPropTree(componentTag)); // NB: bare-metal dafilesrv does not have a component specific xml, extracting relevant global configuration instead Owned config = loadConfiguration(componentDefault, extractedGlobalConfig, argv, componentTag, "DAFILESRV", nullptr, nullptr); diff --git a/fs/dafsserver/dafsserver.cpp b/fs/dafsserver/dafsserver.cpp index f634b8ed730..bfd02bb262b 100644 --- a/fs/dafsserver/dafsserver.cpp +++ b/fs/dafsserver/dafsserver.cpp @@ -1114,10 +1114,9 @@ class CRemoteRequest : public CSimpleInterfaceOf const char* fullTraceContext = requestTree->queryProp("_trace/traceparent"); // We only want to compare the trace-id & span-id, so remove the last "sampling" group - const char* traceParent = fullTraceContext ? fullTraceContext : ""; - traceParent = strrchr(traceParent, '-'); - - if (strlen(traceParent) != 0 && requestTraceParent != traceParent) + std::string traceParent = fullTraceContext; + traceParent = traceParent.substr(0, traceParent.find_last_of('-')); + if (!traceParent.empty() && requestTraceParent != traceParent) { // Check to see if we have an existing span that needs to be marked successful before close if (requestSpan != nullptr) @@ -1134,7 +1133,7 @@ class CRemoteRequest : public CSimpleInterfaceOf else requestSpanName = "WriteRequest"; - requestSpan.set(queryTraceManager().createServerSpan(requestSpanName, traceHeaders)); + requestSpan.setown(queryTraceManager().createServerSpan(requestSpanName, traceHeaders)); requestTraceParent = traceParent; } @@ -5008,7 +5007,7 @@ class CRemoteFileServer : implements IRemoteFileServer, public CInterface Owned traceHeaders = createProperties(); traceHeaders->setProp("traceparent", traceParent); - closeSpan.set(queryTraceManager().createServerSpan("CloseRequest", traceHeaders)); + closeSpan.setown(queryTraceManager().createServerSpan("CloseRequest", traceHeaders)); } if (0 == cursorHandle) @@ -5053,7 +5052,7 @@ class CRemoteFileServer : implements IRemoteFileServer, public CInterface Owned traceHeaders = createProperties(); traceHeaders->setProp("traceparent", traceParent); - versionSpan.set(queryTraceManager().createServerSpan("VersionRequest", traceHeaders)); + versionSpan.setown(queryTraceManager().createServerSpan("VersionRequest", traceHeaders)); } if (outFmt_Binary == outputFormat) From 961a329d9d6df6ee0e09ded2376ca4513761a004 Mon Sep 17 00:00:00 2001 From: James McMullan Date: Fri, 10 Jan 2025 12:02:36 -0500 Subject: [PATCH 4/4] Code review changes --- fs/dafilesrv/dafilesrv.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/dafilesrv/dafilesrv.cpp b/fs/dafilesrv/dafilesrv.cpp index 40490def080..6a5b4d449c1 100644 --- a/fs/dafilesrv/dafilesrv.cpp +++ b/fs/dafilesrv/dafilesrv.cpp @@ -396,7 +396,7 @@ int main(int argc, const char* argv[]) const char* componentTag = "dafilesrv"; Owned defaultConfig = createPTreeFromYAMLString(defaultYaml, 0, ptr_ignoreWhiteSpace, nullptr); - Owned componentDefault(defaultConfig->queryPropTree(componentTag)); + Owned componentDefault(defaultConfig->getPropTree(componentTag)); // NB: bare-metal dafilesrv does not have a component specific xml, extracting relevant global configuration instead Owned config = loadConfiguration(componentDefault, extractedGlobalConfig, argv, componentTag, "DAFILESRV", nullptr, nullptr);