Re: POC: Extension for adding distributed tracing - pg_tracing - Mailing list pgsql-hackers

From Anthonin Bonnefoy
Subject Re: POC: Extension for adding distributed tracing - pg_tracing
Date
Msg-id CAO6_Xqp8h38qRyN63=JwWaaL2M1OHA3q+FRHupTg05kkY_g0OA@mail.gmail.com
Whole thread Raw
In response to Re: POC: Extension for adding distributed tracing - pg_tracing  (Anthonin Bonnefoy <anthonin.bonnefoy@datadoghq.com>)
Responses Re: POC: Extension for adding distributed tracing - pg_tracing
List pgsql-hackers
Hi!

Here's a new version with a good batch of changes.

Renaming/Refactoring:
- All spans are now tracked in the palloced current_trace_spans buffer
compared to top_span and parse_span being kept in a static variable
before.
- I've renamed query_spans to top_span. A top_span serves as the
parent for all spans in a specific nested level.
- More debugging information and assertions. Spans now track their
nested level, if they've been ended and if they are a top_span.

Changes:
- I've added the subxact_count to the span's metadata. This can help
identify the moment a subtransaction was started.
- I've reworked nested queries and utility statements. Previously, I
made the assumptions that we could only have one top_span per nested
level which is not the case. Some utility statements can execute
multiple queries in the same nested level. Tracing utility statement
now works better (see image of tracing a create extension).

Regards,
Anthonin

Attachment

pgsql-hackers by date:

Previous
From: Jim Jones
Date:
Subject: Re: [PATCH] Add inline comments to the pg_hba_file_rules view
Next
From: Daniel Gustafsson
Date:
Subject: Re: bug fix and documentation improvement about vacuumdb