def values():
    """Get the full current set of B3 values.
    :return: A dict containing the keys "X-B3-TraceId", "X-B3-ParentSpanId", "X-B3-SpanId", "X-B3-Sampled" and
    "X-B3-Flags" for the current span or subspan. NB some of the values are likely be None, but
    all keys will be present.
    """
    result = {}
    try:
        # Check if there's a sub-span in progress, otherwise use the main span:
        span = g.get("subspan") if "subspan" in g else g
        for header in b3_headers:
            result[header] = span.get(header)
    except RuntimeError:
        # We're probably working outside the Application Context at this point, likely on startup:
        # https://stackoverflow.com/questions/31444036/runtimeerror-working-outside-of-application-context
        # We return a dict of empty values so the expected keys are present.
        for header in b3_headers:
            result[header] = None

    return result