def __init__(self, api_key, grafana_url=None):
        """
        Create a new connection to Grafana.

        :param grafana_url: if None, then attempt to discover the address of an in-cluster Grafana service
        """
        if grafana_url is None:
            grafana_url = find_service_url("app.kubernetes.io/name=grafana")
        protocol_host = grafana_url.split("://")
        logging.debug(f"Grafana params: protocol - {protocol_host[0]} host - {protocol_host[1]}")
        self.grafana = GrafanaFace(
            auth=api_key,
            protocol=protocol_host[0],
            host=protocol_host[1],
            timeout=GRAFANA_READ_TIMEOUT,
        )

        Create a new connection to Grafana.

        :param grafana_url: if None, then attempt to discover the address of an in-cluster Grafana service
        
src/robusta/integrations/grafana.py