Get trace_id from django request headers.

    :rtype: str
    :returns: TraceID in HTTP request headers.

def get_trace_id_from_django():
    """Get trace_id from django request headers.

    :rtype: str
    :returns: TraceID in HTTP request headers.
    """
    request = _get_django_request()

    if request is None:
        return None

    header = request.META.get(_DJANGO_TRACE_HEADER)
    if header is None:
        return None

    trace_id = header.split("/", 1)[0]

    return trace_id