forked from cockroachdb/cockroach
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
telemetry: allow BEGIN statements to be logged in telemetry transacti…
…on mode Previously, we dropped loggingBEGIN statements in telemetry transaction sampling mode due to BEGIn not having an associated transaction execution id at the time of logging. For transaction sampling we were using the transaction execution id to track the transaction through its execution in order to log all of its statements. Since BEGIN statements did not have an id, we could not start tracking with BEGIN. This commit enables us to include BEGIN statements by using a combination of the session id and session txn counter as the tracking id for telemetry, instead of the execution id. This allows us to start tracking transactions at BEGIN instead of at the statement after it. Part of: cockroachdb#108284 Release note (sql change): Telemetry logging - "transaction" sampling mode will now log BEGIN statements when they are present in a sampled transaction.
- Loading branch information
Showing
4 changed files
with
78 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters