Disable tracing on the provided blacklist paths, by default not tracing
    the health check request.

    If the url path starts with the blacklisted path, return True.

    :type blacklist_paths: list
    :param blacklist_paths: Paths that not tracing.

    :rtype: bool
    :returns: True if not tracing, False if tracing.

def disable_tracing_url(url, blacklist_paths=None):
    """Disable tracing on the provided blacklist paths, by default not tracing
    the health check request.

    If the url path starts with the blacklisted path, return True.

    :type blacklist_paths: list
    :param blacklist_paths: Paths that not tracing.

    :rtype: bool
    :returns: True if not tracing, False if tracing.
    """
    if blacklist_paths is None:
        blacklist_paths = DEFAULT_BLACKLIST_PATHS

    # Remove the 'https?|ftp://' if exists
    url = re.sub(URL_PATTERN, '', url)

    # Split the url by the first '/' and get the path part
    url_path = url.split('/', 1)[1]

    for path in blacklist_paths:
        if url_path.startswith(path):
            return True

    return False