async def track_api_request(self, request: Request, response: Response) -> None:
        """
        Track the endpoint usage. This method is called after the endpoint is processed.
        The method will track the endpoint usage, the user-agent, and the response status code. If an error is raised
        during the endpoint processing, the error will be tracked as well.

        Parameters:
            request (Request): The incoming request
            response (Response): The outgoing response

        """

        endpoint_path = resolve_endpoint_path_for_request(request)
        if endpoint_path is None:
            return

        data = {
            "endpoint": f"{request.method} {endpoint_path}",
            "request.user-agent": request.headers.get("user-agent"),
            "request.method": request.method,
            "request.accept-language": request.headers.get("accept-language"),
            "response.status": str(response.status_code),
        }

        if server_timing := response.headers.get("Server-Timing"):
            duration_in_ms = server_timing.removeprefix("total;dur=")
            data["duration_in_milliseconds"] = duration_in_ms

        if user := get_request_user(request=request):
            data["user.id"] = user.id.urn
            data["user.role"] = user.role

        if response.status_code >= 400:
            if argilla_error := get_request_error(request=request):
                data["response.error_code"] = argilla_error.code  # noqa

        self.track_data(topic="endpoints", data=data)

        Track the endpoint usage. This method is called after the endpoint is processed.
        The method will track the endpoint usage, the user-agent, and the response status code. If an error is raised
        during the endpoint processing, the error will be tracked as well.

        Parameters:
            request (Request): The incoming request
            response (Response): The outgoing response

        
argilla-server/src/argilla_server/telemetry/_client.py