| ▲ | Show HN: SQL-tap – Real-time SQL traffic viewer for PostgreSQL and MySQL(github.com) | |
| 54 points by mickamy 3 hours ago | 6 comments | ||
sql-tap is a transparent proxy that captures SQL queries by parsing the PostgreSQL/MySQL wire protocol and displays them in a terminal UI. You can run EXPLAIN on any captured query. No application code changes needed — just change the port. | ||
| ▲ | altmanaltman a minute ago | parent | next [-] | |
Looks really cool, will try it out soon | ||
| ▲ | buremba an hour ago | parent | prev | next [-] | |
This is very neat! IMO inspecting the queries the agents run on the database is a better approach to understand how the code works, even more than reviewing the code. I just tried and it works smoothly. For those who doesn't want to plug in the agents to their database directly, I built a similar tool https://dbfor.dev for the exact purpose, it just embeds PGLite and implements PG wire protocol to spin up quick PG databases with a traffic viewer included. | ||
| ▲ | debarshri 33 minutes ago | parent | prev | next [-] | |
We do something similar in adaptive [1]. What you can also do is add frontend and backend user to the proxy and then agents won't ever get the actual db user and password. You can make it throwaway too as well as just in time if you want. Traditionally it was database activity monitoring which kind of fell out of fashion, but i think it is going to be back with advent of agents. | ||
| ▲ | CodeWriter23 19 minutes ago | parent | prev | next [-] | |
Really been wanting something like this. Thanks! | ||
| ▲ | nwellinghoff 2 hours ago | parent | prev | next [-] | |
Nice. I like how you made it an easy to drop in proxy. Will definitely use this when debugging issues! | ||
| ▲ | jauntywundrkind 2 hours ago | parent | prev [-] | |
That's some sick observability, nice. | ||