Skip to content

Commit

Permalink
Additional review comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Klemm authored and Tim Klemm committed Jan 9, 2025
1 parent 236557c commit 2d79881
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions esp/bindings/http/platform/httpservice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ struct EspGetMethodNameComparator
};
using EspGetMethodMap = std::map<const char*, EspGetMethod, EspGetMethodNameComparator>;
// 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{
Expand Down Expand Up @@ -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))
{
Expand All @@ -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<ISpan> serverSpan;
if (wantTracing)
{
Expand Down

0 comments on commit 2d79881

Please sign in to comment.