def nsec_to_usec_round(DatetimeNanos) -> int:
    """Round nanoseconds to microseconds

    Timestamp in zipkin spans is int of microseconds.
    See: https://zipkin.io/pages/instrumenting.html
    """
    inttimestamp = DatetimeNanos.timestamp() * 1e9
    return int((inttimestamp + 500) // 10 ** 3)