Live data from Hacker News

Pg_tracing: Distributed Tracing for PostgreSQL

github.com

1–10 of 16 posts

Re: Pg_tracing: Distributed Tracing for PostgreSQL

#2
It would be awesome if this were to make it in core. Jelte did a bunch of work to improve query protocol changes. Having Postgres accept Otel trace propagation would be a gamechanger for debugging the clients and DB together. Especially since ~80%+ of DB related issues I see come down to some sort of long running open transaction which Postgres knows nothing about server-side.

Re: Pg_tracing: Distributed Tracing for PostgreSQL

#8
post #7

There's nothing "distributed" about it (the only word that got me click). The database you send the traces to may be distributed, just like any database, but pg_tracing does nothing for it.

Distributed tracing is a term for tracing that span between systems. With distributed tracing you can follow request traces across your various services. With pg_tracing enabled in postgres this would extend to your database.

Re: Pg_tracing: Distributed Tracing for PostgreSQL

#10
post #7

There's nothing "distributed" about it (the only word that got me click). The database you send the traces to may be distributed, just like any database, but pg_tracing does nothing for it.

You have a service that talks to postgres, probably other services that talk to that service, a client that talks to these services through some gateway. When a user clicks a button, distributed tracing allows you to see the whole request right from the button click to API gateway, to every service it goes through to the DB.. and all the way back. So you can see exactly the path it took, where it slowed down or failed. DBs are usually seen as black boxes in such systems. We just see the DB call took 500ms. We don't know what happened inside though. This allows such distributed traces to also get visibility to the internals of the DB so you can tell the exact joins, index scans etc that took place by looking at your distributed trace. I don't know what level of visibility they've built but that's the general idea.
Post reply on HN