def convert_readable_span_to_proto(span: ReadableSpan) -> SpanProto:
    """
    Converts a ReadableSpan object to a protobuf object for a Span.
    Args:
        span: The span to be converted.
    Returns:
        SpanProto: The converted span in SpanProto format.
    """
    span_proto = SpanProto(
        trace_id=span.context.trace_id.to_bytes(16, "big")
        if span.context
        else b"",
        span_id=span.context.span_id.to_bytes(8, "big")
        if span.context
        else b"",
        parent_span_id=span.parent.span_id.to_bytes(8, "big")
        if span.parent
        else b"",
        name=span.name,
        kind=SpanProto.SpanKind.SPAN_KIND_INTERNAL,
        start_time_unix_nano=span.start_time if span.start_time else 0,
        end_time_unix_nano=span.end_time if span.end_time else 0,
        attributes=[
            KeyValue(key=k, value=convert_to_any_value(v))
            for k, v in span.attributes.items()
        ]
        if span.attributes
        else None,
        status=Status(code=Status.StatusCode.STATUS_CODE_UNSET),
    )
    # TODO(otel): Remove this once the Snowflake backend no longer uses this!
    span_proto.attributes.append(
        KeyValue(key="name", value=convert_to_any_value(span.name))
    )
    return span_proto

    Converts a ReadableSpan object to a protobuf object for a Span.
    Args:
        span: The span to be converted.
    Returns:
        SpanProto: The converted span in SpanProto format.
    
src/core/trulens/experimental/otel_tracing/core/exporter/utils.py