Add tracing for connecting to postgres
This is a difficult to debug area where both the server authors and users would like detailed information about what happened when a connection to postgres fails.
We should add a span for the connection process with all provided information and sub-spans for any interesting subroutines. And capture all errors.
Could you clarify about the "span for the connection process"? Is it about tracing the connection initialisation, i.e. from the moment Electric opens a connection to Postgres and up until the point it either succeeds or fails?
yeah exactly, the initialization. Also reconnects, retries, etc.
We'll work on this once #1762 is in.