protected static function logDuration(Request $request, Response $response, $startTime)
    {
        $duration = microtime(true) - $startTime;

        $tags = [
            "status_code" => $response->getStatusCode()
        ];

        if (!config('datadog-helper.middleware_disable_url_tag', false)) {
            $tags["url"] = $request->getSchemeAndHttpHost() . $request->getRequestUri();
        }

        Datadog::timing('request_time', $duration, 1, $tags);
    }