Getting internal error in sentry sdk

I am getting repetitive errors in the log after I fixed it. Is it possible to clear those message in sentry-worker.

03:22:25 [INFO] sentry.tasks.update_user_reports: update_user_reports.records_updated (reports_to_update=0 reports_with_event=0 updated_reports=0)
03:22:25 [WARNING] sentry.tasks.release_registry: Release registry URL is not specified, skipping the task.
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/urllib3/connection.py", line 159, in _new_conn
    (self._dns_host, self.port), self.timeout, **extra_kw)
  File "/usr/local/lib/python3.6/site-packages/urllib3/util/connection.py", line 80, in create_connection
    raise err
  File "/usr/local/lib/python3.6/site-packages/urllib3/util/connection.py", line 70, in create_connection
    sock.connect(sa)
ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 600, in urlopen
    chunked=chunked)
  File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 354, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/usr/local/lib/python3.6/http/client.py", line 1287, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/usr/local/lib/python3.6/http/client.py", line 1333, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/usr/local/lib/python3.6/http/client.py", line 1282, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/usr/local/lib/python3.6/http/client.py", line 1042, in _send_output
    self.send(msg)
  File "/usr/local/lib/python3.6/http/client.py", line 980, in send
    self.connect()
  File "/usr/local/lib/python3.6/site-packages/urllib3/connection.py", line 181, in connect
    conn = self._new_conn()
  File "/usr/local/lib/python3.6/site-packages/urllib3/connection.py", line 168, in _new_conn
    self, "Failed to establish a new connection: %s" % e)
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0x7f867fa1ac50>: Failed to establish a new connection: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/sentry_sdk/transport.py", line 340, in send_envelope_wrapper
    self._send_envelope(envelope)
  File "/usr/local/lib/python3.6/site-packages/sentry_sdk/transport.py", line 267, in _send_envelope
    endpoint_type="envelope",
  File "/usr/local/lib/python3.6/site-packages/sentry/utils/sdk.py", line 216, in patched_send_request
    return _send_request(*args, **kwargs)
  File "/usr/local/lib/python3.6/site-packages/sentry_sdk/transport.py", line 180, in _send_request
    headers=headers,
  File "/usr/local/lib/python3.6/site-packages/urllib3/request.py", line 72, in request
    **urlopen_kw)
  File "/usr/local/lib/python3.6/site-packages/urllib3/request.py", line 150, in request_encode_body
    return self.urlopen(method, url, **extra_kw)
  File "/usr/local/lib/python3.6/site-packages/urllib3/poolmanager.py", line 324, in urlopen
    response = conn.urlopen(method, u.request_uri, **kw)
  File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 667, in urlopen
    **response_kw)
  File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 667, in urlopen
    **response_kw)
  File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 667, in urlopen
    **response_kw)
  File "/usr/local/lib/python3.6/site-packages/urllib3/connectionpool.py", line 638, in urlopen
    _stacktrace=sys.exc_info()[2])
  File "/usr/local/lib/python3.6/site-packages/urllib3/util/retry.py", line 399, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='sentry.EXAMPLE.com', port=80): Max retries exceeded with url: /api/1/envelope/ (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f867fa1ac50>: Failed to establish a new connection: [Errno 111] Connection refused',))
03:22:29 [ERROR] sentry_sdk.errors: Internal error in sentry_sdk

I am not allow to access (cause of ALI k8s cluster strategy) internal service of the Sentry in one k8s cluster but different namespace via a external domain (like ‘sentry.EXAMPLE.com’) . In my option, I shouldn’t care the internal service of the Sentry. Someone has any other idea?

# in the client

sentry_sdk.init(
    # dsn="http://b2dee76ac01c44ff8fc527c429034187@sentry.EXAMPLE.com/4",
    dsn="http://b2dee76ac01c44ff8fc527c429034187@sentry-relay.{K8S_NAMESPACE}:3000/4",
    integrations=[RedisIntegration()],

    # Set traces_sample_rate to 1.0 to capture 100%
    # of transactions for performance monitoring.
    # We recommend adjusting this value in production.
    traces_sample_rate=0.1,

    # If you wish to associate users to errors (assuming you are using
    # django.contrib.auth) you may enable sending PII data.
    send_default_pii=True,
)

Thanks in advance!

Fixed!
Cause of k8s network strategy, our ingress controller deploy with deployment but daemonset, then service which in one cluster can not be accessed sometimes.

I add something like that.

# sentry_sdk/utils.py
      def get_api_url(
          self, type="store"  # type: EndpointType
      ):
          # type: (...) -> str
          """Returns the API url for storing events."""
          if type in ['store', 'envelope']:
              host = 'sentry-relay:3000'
              scheme = 'http'
          else:
              host = self.host
              scheme = self.scheme

          return "%s://%s%sapi/%s/%s/" % (
              scheme,
              host,
              self.path,
              self.project_id,
              type,
          )