Live data from Hacker News

Pg_tracing: Distributed Tracing for PostgreSQL

github.com

11–16 of 16 posts

Re: Pg_tracing: Distributed Tracing for PostgreSQL

#12
This looks very useful for our database heavy teams.

Getting this information is certainly already possible, but there is a bit of a barrier in front of it. You need to realize the query is slow, then you need to re-run it with the right EXPLAIN and/or ANALYZE incantation with 8-9 parameters for a query visualizer, paste it into a query visualizer and then you get some nice, easily digested overview of what is going on.

Teams either don't know how to do that, or don't do that, due to permissions or because it's a hassle. Having a slow "calculateFooReport()" trace go straight into a bunch of slow SequentialScan- and NestedLoop-Nodes would remove one excuse from that equation.

Kinda bummed that we're updating out of the supported versions starting next month.

Re: Pg_tracing: Distributed Tracing for PostgreSQL

#13
post #5
post #4

Earlier quoted context omitted.

Or complete?

> pg_tracing only supports PostgreSQL 14, 15 and 16 for the moment. PostgresSQL is already at 18.

The last couple commits were about pg18 support. Maybe development stalled, but didn't completely stop

Also, tracing support is being upstreamed into Postgres proper https://github.com/DataDog/pg_tracing/issues/86 which would make this extension obsolete

Re: Pg_tracing: Distributed Tracing for PostgreSQL

#14
post #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.

Yes, I know I've been using it for a while.

The hard part is to merge one trace between storage workers, that's where distributed part comes. pg_tracing does nothing for it.

UPDATE: ah I believe I see what you mean -- that it passes down the trace ID.

Re: Pg_tracing: Distributed Tracing for PostgreSQL

#15
post #3

It looks abandoned.

I've had this with multiple datadog libraries. Even offered to implement some features for the python one for free because we were missing a feature but they just never responded. Note that they had this feature in their php lib so it was not some outrageous demand.

Re: Pg_tracing: Distributed Tracing for PostgreSQL

#16
post #14
post #8

Earlier quoted context omitted.

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.

Yes, I know I've been using it for a while. The hard part is to merge one trace between storage workers, that's where distributed part comes. pg_tracing does nothing for it. UPDATE: ah I believe I see what you mean -- that it passes down the trace ID.

Yeah, this is for integration with OTEL standard distributed tracing. So you configure some OTEL compliant endpoint for postgres to send trace spans to and that endpoint will collect traces from different services and store them for later retrieval.
Post reply on HN