def trulens_trace(record: Union[record_schema.Record, str]):
    """Display the trace view for a record.

    Args:
        record: Either a trulens record (non-OTel) or a record_id string (OTel).

    Example:
        ```python
        from trulens.core import streamlit as trulens_st

        # Using with Record object
        with tru_llm as recording:
            response = llm.invoke(input_text)
        record, response = recording.get()
        trulens_st.trulens_trace(record=record)

        # Using with record_id string
        trulens_st.trulens_trace(record="record_123")
        ```
    """

    session = core_session.TruSession()
    if isinstance(record, record_schema.Record):
        app = session.get_app(app_id=record.app_id)
    if dashboard_utils.is_sis_compatibility_enabled():
        st.warning(
            "TruLens trace view is not enabled when SiS compatibility is enabled."
        )
    elif isinstance(record, str):
        event_spans = _get_event_otel_spans(record)
        if event_spans:
            dashboard_record_viewer_otel.record_viewer_otel(
                spans=event_spans, key=None
            )
        else:
            st.warning("No OTel trace data available for this record.")
    else:
        dashboard_record_viewer.record_viewer(
            record_json=json.loads(json_utils.json_str_of_obj(record)),
            app_json=app,
        )
Display the trace view for a record.

    Args:
        record: Either a trulens record (non-OTel) or a record_id string (OTel).

    Example:
        ```python
        from trulens.core import streamlit as trulens_st

        # Using with Record object
        with tru_llm as recording:
            response = llm.invoke(input_text)
        record, response = recording.get()
        trulens_st.trulens_trace(record=record)

        # Using with record_id string
        trulens_st.trulens_trace(record="record_123")
        ```
    
src/dashboard/trulens/dashboard/streamlit.py