Calculates the key we use in the "trace" array for a given request.
private function getTraceKey(Request $request) : string { $path = $request->getPathInfo(); if ($qs = $request->getQueryString()) { $path .= '?' . $qs; } try { return $request->getMethod() . ' ' . $path; } catch (SuspiciousOperationException) { return '_BAD_METHOD_ ' . $path; } }