def extract_span_from_django_request(request, *args, **kwargs):
    """
    Safe utility function to extract the ``current_span`` from ``HttpRequest``. Compatible with ``@trace`` decorator.
    """
    try:
        return getattr(request, 'current_span', None)
    except Exception:  # pragma: no cover
        pass

    return None