    def log(
        self,
        data: DT,
        name: str,
        role: str,
        data_type: str,
    ) -> None:
        """
        log a data with column name, role and type to the current record
        """
        if name in self.PRESERVED_COLUMNS:
            logger.warning(
                "Column name %s is reserved, will be renamed to %s", name, name + "_"
            )
            name = name + "_"

        if role not in BENTOML_MONITOR_ROLES:
            logger.warning(
                f"Role {role} is not officially supported, but will be logged anyway."
            )
        if data_type not in BENTOML_MONITOR_TYPES:
            logger.warning(
                f"Data type {data_type} is not officially supported, but will be logged anyway."
            )

        if self.columns_schema is None:
            columns = MON_COLUMN_VAR.get()
            assert columns is not None
            if name in columns:
                logger.warning(
                    "Column name %s is duplicated, will be ignored.",
                    name,
                )
            else:
                columns[name] = {
                    "name": name,
                    "role": role,
                    "type": data_type,
                }
        datas = MON_DATAS_VAR.get()
        assert datas is not None
        datas[name].append(data)
log a data with column name, role and type to the current record
src/bentoml/_internal/monitoring/base.py