    def __init__(
        self,
        name: str,
        endpoint: str | None = None,
        insecure: bool | str | None = None,
        credentials: str | None = None,
        headers: str | None = None,
        timeout: int | str | None = None,
        compression: str | None = None,
        meta_sample_rate: float = 1.0,
        protocol: t.Literal["http", "grpc"] = "http",
        **_: t.Any,
    ) -> None:
        """
        Initialize the monitor.

        Args:
            name: The name of the monitor.
            endpoint: The endpoint to send the data to.
            insecure: Whether to use insecure connection.
            credentials: The credentials to use.
            headers: The headers to use.
            timeout: The timeout to use.
            compression: The compression to use.
            protocol: The protocol to use.
        """
        super().__init__(name, **_)

        self.endpoint = endpoint
        self.insecure = insecure
        self.credentials = credentials
        self.headers = headers
        self.timeout = timeout
        self.compression = compression
        self.meta_sample_rate = meta_sample_rate

        self.logger_provider: LoggerProvider | None = None
        self.data_logger: logging.Logger | None = None
        self._schema: dict[str, dict[str, str]] = {}
        self._will_export_schema = False

        self.protocol = protocol
Initialize the monitor.

Args:
name: The name of the monitor.
endpoint: The endpoint to send the data to.
insecure: Whether to use insecure connection.
credentials: The credentials to use.
headers: The headers to use.
timeout: The timeout to use.
compression: The compression to use.
protocol: The protocol to use.
src/bentoml/_internal/monitoring/otlp.py