What's hidden in the psycopg2 connect span?

Hey @Rodrigo_Jimenez

The connect span represents the time it takes to call the psycopg2.connect() function. I can't really say what exactly could be slow there, as I'm not familiar enough with the internals of psycopg2. However, I do know that connecting to a PostgreSQL database can be relatively heavy, especially between cloud providers. Did you already look into connection pooling (e.g. pgbouncer) or persistent connections? That could limit the impact of latency while establishing the connection.

Cheers
Beni