def _update_cost_info_otel(
        self,
        target_dict: dict,
        record_attributes: dict,
        include_tokens: bool = False,
    ):
        """Update cost information in the target dictionary.

        Args:
            target_dict: Dictionary to update with cost information
            record_attributes: Source attributes containing cost information
            include_tokens: Whether to update token count (only for record_events)
        """
        if any(
            key.startswith(SpanAttributes.COST.base)
            for key in record_attributes
        ):
            if include_tokens:
                target_dict["total_tokens"] += record_attributes.get(
                    SpanAttributes.COST.NUM_TOKENS, 0
                )

            target_dict["total_cost"] += record_attributes.get(
                SpanAttributes.COST.COST, 0.0
            )
            target_dict["cost_currency"] = record_attributes.get(
                SpanAttributes.COST.CURRENCY, "USD"
            )

        # TODO(SNOW-2061174): convert to map (see comment: https://github.com/truera/trulens/pull/1939#discussion_r2054802093)
        # Add to total_cost map
        # cost = record_attributes.get(SpanAttributes.COST.COST, 0.0)
        # currency = record_attributes.get(SpanAttributes.COST.CURRENCY, "USD")
        # if currency not in record_events[record_id]["total_cost"]:
        #     record_events[record_id]["total_cost"][currency] = 0.0
        # record_events[record_id]["total_cost"][currency] += cost
Update cost information in the target dictionary.

        Args:
            target_dict: Dictionary to update with cost information
            record_attributes: Source attributes containing cost information
            include_tokens: Whether to update token count (only for record_events)
        
src/core/trulens/core/database/sqlalchemy.py