Module statement_logging

Source

Modulesยง

sealed ๐Ÿ”’

Structsยง

PreparedStatementEvent
Rows to be written to mz_prepared_statement_history and mz_sql_text, with the session id.
SessionHistoryEvent ๐Ÿ”’
StatementBeganExecutionRecord
Contains all the information necessary to generate the initial entry in mz_statement_execution_history. We need to keep this around in order to modify the entry later once the statement finishes executing.
StatementEndedExecutionRecord
StatementLoggingFrontend
Encapsulates statement logging state needed by the frontend peek sequencing.
StatementLoggingId
StatementPreparedRecord ๐Ÿ”’
Contains all the information necessary to generate an entry in mz_prepared_statement_history
ThrottlingState
Throttling state for statement logging, shared across multiple frontend tasks (and currently also shared with the old peek sequencing).
ThrottlingStateInner ๐Ÿ”’
WatchSetCreation
Bundles all information needed to install watch sets for statement lifecycle logging. This includes the statement logging ID and the transitive dependencies to watch.

Enumsยง

FrontendStatementLoggingEvent
Represents a single statement logging event that can be sent from the frontend peek sequencing to the Coordinator via an mpsc channel.
PreparedStatementLoggingInfo
Metadata required for logging a prepared statement.
StatementEndedExecutionReason
StatementExecutionStrategy
StatementLifecycleEvent

Functionsยง

create_began_execution_record ๐Ÿ”’
Helper function to create a StatementBeganExecutionRecord.
effective_sample_rate ๐Ÿ”’
The effective rate at which statement execution should be sampled. This is the value of the session var statement_logging_sample_rate, constrained by the system var statement_logging_max_sample_rate.
pack_statement_began_execution_update ๐Ÿ”’
pack_statement_execution_inner ๐Ÿ”’
pack_statement_prepared_update ๐Ÿ”’
serialize_params ๐Ÿ”’
Helper function to serialize statement parameters for logging.
should_sample_statement ๐Ÿ”’
Helper function to decide whether to sample a statement execution. Returns true if the statement should be sampled based on the sample rate.