           {:error, reason} ->
             :telemetry.execute([:redix, :failed_connection], %{}, %{
               connection: opts[:name] || self(),
-              reason: reason,
+              reason: %ConnectionError{reason: reason},
               sentinel_address: format_host(sentinel)
             })
 

      {:error, reason} ->
        :telemetry.execute([:redix, :failed_connection], %{}, %{
          connection: opts[:name] || self(),
          reason: reason,
          sentinel_address: format_host(sentinel)
        })


  @socket_opts [:binary, active: false]
  @default_timeout 5000
  @default_ssl_opts [verify: :verify_peer, depth: 2]

  alias Redix.ConnectionError

  require Logger

