You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
153296: sql: add txn diagnostics collection to instrumentation helper r=kyle-a-wong a=kyle-a-wong
commit 1/2:
When calling the setup method on instrumentationhelper (ih), ih will
now check if transaction diagnostics should should be collected. Transaction
diagnostics collection uses a prefix based matching system to determine
whether or not transaction diagnostics collection should start, continue,
or stop. This works by creating a list of statement fingerprint ids, that make
up a transaction fingerprint, and comparing the currently executing statement
fingerprint id against this list. If at any point the expected statement fingerprint
id doesn't match, diagnostics collection is short circuited and no longer
collected.
This change also causes transaction diagnostics collection to take precedence
over statement transaction diagnostics, meaning if a transaction diagnostics request
exists that contains a statement that also has a statement diagnostics request,
the transaction diagnostic request gets priority over collecting the bundle.
When a transaction diagnostics request is being fulfilled, statement bundles for
every statement in the transaction are built and collected in memory. Only after
a transaction is finalized and it is determined that the request is fulfilled are all
the statement bundles and the transaction trace stored in the corresponding
system tables.
Resolves: [CRDB-54321](https://cockroachlabs.atlassian.net/browse/CRDB-54321)
Epic: [CRDB-53541](https://cockroachlabs.atlassian.net/browse/CRDB-53541)
Release note: None
----
commit 2/2:
sql: replace statement fingerprint id construction with fingerprint id from instrumentation helper
The instrumentation helper now generates a statement fingerprint id in its
setup function and stores it in its state. Now, when fingerprint ids
are needed for sql stats collection or telemetry logging, the fingerprint
id from the instrumentation helper is used.
Epic: None
Release note: None
Co-authored-by: Kyle Wong <[email protected]>
0 commit comments