From 2d79881ea1da0f8e3387dff0f9623e9ddcfc9a63 Mon Sep 17 00:00:00 2001 From: Tim Klemm Date: Thu, 9 Jan 2025 12:57:13 -0500 Subject: [PATCH] Additional review comments. --- esp/bindings/http/platform/httpservice.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/esp/bindings/http/platform/httpservice.cpp b/esp/bindings/http/platform/httpservice.cpp index 73d400f6cd4..f0948577949 100644 --- a/esp/bindings/http/platform/httpservice.cpp +++ b/esp/bindings/http/platform/httpservice.cpp @@ -324,7 +324,7 @@ struct EspGetMethodNameComparator }; using EspGetMethodMap = std::map; // Association of method names to specific "esp" service requests. This mapping allows -// pprocessRequest to decide if the request should be traced before processing the request, without +// processRequest to decide if the request should be traced before processing the request, without // repeating the method name string comparisons. Multiple names may map to the same request, and // all redundant names (e.g., "files" and "files_") must be included in the map. static const EspGetMethodMap getRequests{ @@ -410,7 +410,7 @@ int CEspHttpServer::processRequest() // traced. Create a server span, if needed, before proceding with request processing // so maximize the amount of request processing that can be traced. Specifically, user // authentication and authorization may generate trace output. - bool wantTracing = true; + bool wantTracing = queryTraceManager().isTracingEnabled(); EspGetMethod espGetMethod = EspGetMethod::NotApplicable; if (streq(method, GET_METHOD)) { @@ -432,9 +432,6 @@ int CEspHttpServer::processRequest() } else if (!m_apport) wantTracing = false; - // Check last to prevent necessary side effects of other checks from occurring. - else if (!queryTraceManager().isTracingEnabled()) - wantTracing = false; Owned serverSpan; if (wantTracing) {