def _b3_id_to_dd_id(b3_id):
    # type: (str) -> int
    """Helper to convert B3 trace/span hex ids into Datadog compatible ints

    If the id is > 64 bit then truncate the trailing 64 bit.

    "463ac35c9f6413ad48485a3953bb6124" -> "48485a3953bb6124" -> 5208512171318403364
    """
    return int(b3_id[-16:], 16)