package
25.1.0+incompatible
Repository: https://github.com/cockroachdb/cockroach.git
Documentation: pkg.go.dev
# Functions
AlterDatabasePlacementCounter is to be incremented when the placement policy on a multi-region database is being altered.
AlterDatabaseSurvivalGoalCounter is to be incremented when the survival goal on a multi-region database is being altered.
AlterTableLocalityCounter is to be incremented every time a locality is changed on a table.
BinOpCounter creates a telemetry counter for a scalar binary operator.
BuiltinCounter creates a telemetry counter for a built-in function.
CastOpCounter creates a telemetry counter for a scalar cast operator.
CmpOpCounter creates a telemetry counter for a scalar comparison operator.
CreateDatabasePlacementCounter is to be incremented when a placement policy is set on a new multi-region database.
CreateDatabaseSurvivalGoalCounter is to be incremented when the survival goal on a multi-region database is being set.
CreateDropOwnedByCounter returns a counter to increment for the DROP OWNED BY command.
CreateExtensionCounter returns a counter to increment for creating extensions.
CreateReassignOwnedByCounter returns a counter to increment for the REASSIGN OWNED BY command.
CreateTableLocalityCounter is to be incremented every time a locality is set on a table.
DummySessionVarValueCounter is to be incremented every time a client attempts to set a compatitibility session var to a dummy value.
HashedFeatureCounter returns a counter for the specified feature which hashes the feature name before reporting.
IncIAMAlterCounter is to be incremented every time an ALTER ROLE happens.
IncIAMCreateCounter is to be incremented every time a CREATE ROLE happens.
IncIAMDropCounter is to be incremented every time a DROP ROLE happens.
IncIAMGrantCounter is to be incremented every time a GRANT ROLE happens.
IncIAMGrantPrivilegesCounter is to be incremented every time a GRANT <privileges> happens.
IncIAMOptionCounter is to be incremented every time a CREATE/ALTER role with an OPTION (ie.
IncIAMRevokeCounter is to be incremented every time a REVOKE ROLE happens.
IncIAMRevokePrivilegesCounter is to be incremented every time a REVOKE <privileges> happens.
IncrementEnumCounter is used to increment the telemetry counter for a particular usage of enums.
IncrementGetVirtualTableEntry is used to increment telemetry counter for any use of tracked schemas tables.
IncrementPartitioningCounter is used to increment the telemetry counter for a particular partitioning operation.
IncrementPlpgsqlStmtCounter is to be incremented every time a new plpgsql stmt is used for a newly created function.
IncrementShowCounter is used to increment the telemetry counter for a particular show command.
IncrementUserDefinedSchemaCounter is used to increment the telemetry counter for a particular usage of user defined schemas.
IsolationLevelCounter is to be incremented whenever a transaction is started or if the isolation level of a running transaction is configured.
IsolationLevelUpgradedCounter is to be incremented whenever a transaction is started with a higher isolation level than the one that the user requested for the transaction.
OptNodeCounter should be incremented every time a node of the given type is encountered at the end of the query optimization (i.e.
RecordError processes a SQL error.
ReportJoinReorderLimit is to be called whenever the reorder joins session variable is set.
ResetTableStorageParameter is to be incremented every time a table storage parameter has been RESET.
ScheduledBackupControlCounter is to be incremented every time a scheduled job control action is taken.
SchemaChangeAlterCounter behaves the same as SchemaChangeAlterCounterWithExtra but with no extra metadata.
SchemaChangeAlterCounterWithExtra is to be incremented for ALTER schema changes.
SchemaChangeCreateCounter is to be incremented every time a CREATE schema change was made.
SchemaChangeDropCounter is to be incremented every time a DROP schema change was made.
SchemaChangeErrorCounter is to be incremented for different types of errors.
SchemaChangeIndexCounter is to be incremented for certain CREATE index operations.
SchemaJobControlCounter is to be incremented every time a job control action is taken.
SchemaNewColumnTypeQualificationCounter is to be incremented every time a new qualification is used for a newly created column.
SchemaNewTypeCounter is to be incremented every time a new data type is used in a schema, i.e.
SchemaSetAuditModeCounter is to be incremented every time an audit mode is set.
SchemaSetZoneConfigCounter is to be incremented every time a ZoneConfig argument is parsed.
SerialColumnNormalizationCounter is to be incremented every time a SERIAL type is processed in a column definition.
SetTableStorageParameter is to be incremented every time a table storage parameter has been SET (through CREATE TABLE or ALTER TABLE).
UnaryOpCounter creates a telemetry counter for a scalar unary operator.
UnimplementedClientStatusParameterCounter is to be incremented every time a client attempts to configure a status parameter that's not supported upon session initialization.
UnimplementedSessionVarValueCounter is to be incremented every time a client attempts to set a compatitibility session var to an unsupported value.
VecModeCounter is to be incremented every time the vectorized execution mode is changed (including turned off).
WindowFunctionCounter is to be incremented every time a window function is being planned.
# Constants
AlterAllPartitions represents an ALTER ALL PARTITIONS statement (ALTER PARTITION OF INDEX t@*).
AlterRole is used when an ALTER ROLE / USER is the operation.
Constraints represents the SHOW CONSTRAINTS command.
Create represents the SHOW CREATE command.
CreateExternalConnection represents the SHOW CREATE EXTERNAL CONNECTION command.
CreateRole is used when an CREATE ROLE / USER is the operation.
CreateSchedule represents the SHOW CREATE SCHEDULE command.
EnumAlter represents an ALTER TYPE ..
EnumCreate represents a CREATE TYPE ..
EnumDrop represents a DROP TYPE command.
EnumInTable tracks when an enum type is used in a table.
ExternalConnection represents the SHOW EXTERNAL CONNECTION command.
FullTableScans represents the SHOW FULL TABLE SCANS command.
Indexes represents the SHOW INDEXES command.
Jobs represents the SHOW JOBS command.
Locality represents the SHOW LOCALITY command.
LogicalReplicationJobs represents the SHOW LOGICAL REPLICATION JOBS command.
OnAllFunctionsInSchema is used when a GRANT/REVOKE is happening on all functions in a set of schemas.
OnAllProceduresInSchema is used when a GRANT/REVOKE is happening on all procedures in a set of schemas.
OnAllSequencesInSchema is used when a GRANT/REVOKE is happening on all sequences in a set of schemas.
OnAllTablesInSchema is used when a GRANT/REVOKE is happening on all tables in a set of schemas.
OnDatabase is used when a GRANT/REVOKE is happening on a database.
OnExternalConnection is used when a GRANT/REVOKE is happening on an external connection object.
OnFunction is used when a GRANT/REVOKE is happening on a function.
OnProcedure is used when a GRANT/REVOKE is happening on a procedure.
OnSchema is used when a GRANT/REVOKE is happening on a schema.
OnSequence is used when a GRANT/REVOKE is happening on a sequence.
OnSystem is used when a GRANT/REVOKE is happening on system.
OnTable is used when a GRANT/REVOKE is happening on a table.
OnType is used when a GRANT/REVOKE is happening on a type.
PartitionConstrainedScan represents when the optimizer was able to use partitioning to constrain a scan.
Partitions represents the SHOW PARTITIONS command.
Queries represents the SHOW QUERIES command.
RangeForRow represents the SHOW RANGE FOR ROW command.
Ranges represents the SHOW RANGES command.
Regions represents the SHOW REGIONS command.
RegionsFromAllDatabases represents the SHOW REGIONS FROM ALL DATABASES command.
RegionsFromCluster represents the SHOW REGIONS FROM CLUSTER command.
RegionsFromDatabase represents the SHOW REGIONS FROM DATABASE command.
Role is used when the syntax used is the ROLE version (ie.
Roles represents the SHOW ROLES command.
Schedules represents the SHOW SCHEDULE command.
SuperRegions represents the SHOW SUPER REGIONS command.
SurvivalGoal represents the SHOW SURVIVAL GOAL command.
User is used when the syntax used is the USER version (ie.
UserDefinedSchemaAlter represents an ALTER SCHEMA command.
UserDefinedSchemaCreate represents a CREATE SCHEMA command.
UserDefinedSchemaDrop represents a DROP SCHEMA command.
UserDefinedSchemaReparentDatabase represents an ALTER DATABASE ..
UserDefinedSchemaUsedByObject tracks when an object is created in a user defined schema.
# Variables
AlterDatabaseAddRegionCounter is to be incremented when a region is added to a database.
AlterDatabaseDropPrimaryRegionCounter is to be incremented when a primary region is dropped from a database.
AlterDatabaseDropRegionCounter is to be incremented when a non-primary region is dropped from a database.
ArrayCastCounter is to be incremented when type checking all casts that involve arrays.
ArrayConstructorCounter is to be incremented upon type checking of ARRAY[...] expressions/.
ArrayFlattenCounter is to be incremented upon type checking of ARRAY(...) expressions.
ArraySubscriptCounter is to be incremented upon type checking an array subscript expression x[...].
BinaryDecimalInfinityCounter is to be incremented every time a client requests the binary encoding for a decimal infinity, which is not well defined in the pg protocol (#32489).
BindRequestCounter is to be incremented every time a bind request is made.
CancelQueriesUseCounter is to be incremented whenever CANCEL QUERY or CANCEL QUERIES is run.
CancelRequestCounter is to be incremented every time a pgwire-level cancel request is received from a client.
CancelSessionsUseCounter is to be incremented whenever CANCEL SESSION or CANCEL SESSIONS is run.
CascadesLimitReached is to be incremented whenever the limit of foreign key cascade for a single query is exceeded.
CloseRequestCounter is to be incremented every time a close request is made.
CockroachShellCounter is to be incremented every time a client uses the Cockroach SQL shell to connect to CockroachDB.
CorrelatedSubqueryUseCounter is to be incremented every time a correlated subquery has been processed during planning.
CreateMultiRegionDatabaseCounter is to be incremented when a multi-region database is created.
CreateStatisticsUseCounter is to be incremented whenever a non-automatic run of CREATE STATISTICS occurs.
CreateTempSequenceCounter is to be incremented every time a TEMP SEQUENCE has been created.
CreateTempTableCounter is to be incremented every time a TEMP TABLE has been created.
CreateTempViewCounter is to be incremented every time a TEMP VIEW has been created.
CreateUnloggedTableCounter is a counter that is incremented every time an unlogged table is created.
CteUseCounter is to be incremented every time a CTE (WITH ...) is planned without error in a query (this includes both recursive and non-recursive CTEs).
DDLOnlyTransactionFailureCounter is incremented whenever an explicit transaction that has only DDL statements fails.
DDLOnlyTransactionSuccessCounter is incremented whenever an explicit transaction that has only DDL statements succeeds.
DeclarativeSchemaChangerCounter is incremented whenever the declarative schema changer is used.
DefaultIntSize4Counter is to be incremented every time a client change the default_int_size variable to its non-default value 4.
DescribeRequestCounter is to be incremented every time a describe request is made.
DistributedErrorLocalRetryAttempt is to be incremented whenever a distributed query error results in a local rerun.
DistributedErrorLocalRetrySuccess is to be incremented whenever the local rerun - of a distributed query that hit SQL retryable error - failed itself.
DistSQLExecCounter is to be incremented whenever a query is distributed across multiple nodes.
EnumCastCounter is to be incremented when typechecking casts that are between enums.
ExecuteRequestCounter is to be incremented every time a execute request is made.
ExplainAnalyzeDebugUseCounter is to be incremented whenever EXPLAIN ANALYZE (DEBUG) is run.
ExplainAnalyzeDistSQLUseCounter is to be incremented whenever EXPLAIN ANALYZE (DISTSQL) is run.
ExplainAnalyzeUseCounter is to be incremented whenever EXPLAIN ANALYZE is run.
ExplainDDL is to be incremented whenever EXPLAIN (DDL) is run.
ExplainDDLVerbose is to be incremented whenever EXPLAIN (DDL, VERBOSE) is run.
ExplainDDLViz is to be incremented whenever EXPLAIN (DDL, VIZ) is run.
ExplainDistSQLUseCounter is to be incremented whenever EXPLAIN (DISTSQL) is run.
ExplainGist is to be incremented whenever EXPLAIN (GIST) is run.
ExplainOptUseCounter is to be incremented whenever EXPLAIN (OPT) is run.
ExplainOptVerboseUseCounter is to be incremented whenever EXPLAIN (OPT, VERBOSE) is run.
ExplainPlanUseCounter is to be incremented whenever vanilla EXPLAIN is run.
ExplainVecUseCounter is to be incremented whenever EXPLAIN (VEC) is run.
ExpressionIndexCounter is to be incremented every time an expression index is created.
FeatureDeniedByFeatureFlagCounter is a counter that is incremented every time a feature is denied via the feature flag cluster setting, for example.
FlushRequestCounter is to be incremented every time a flush request is made.
FollowerReadDisabledCCLCounter is to be increment every time follower reads are requested but unavailable due to not having the CCL build.
FollowerReadDisabledNoEnterpriseLicense is to be incremented every time follower reads are requested but unavailable due to not having enterprise enabled.
ForceSavepointRestartCounter is to be incremented every time a client customizes the session variable force_savepoint_restart to a non-empty string.
ForeignKeyCascadesUseCounter is to be incremented every time a mutation involves a cascade.
ForeignKeyChecksUseCounter is to be incremented every time a mutation has foreign key checks and the checks are planned by the optimizer.
GeographyInvertedIndexCounter is to be incremented every time a geography inverted index is created.
GeometryInvertedIndexCounter is to be incremented every time a geometry inverted index is created.
HashAggregationDiskSpillingDisabled is to be incremented whenever the disk spilling of the vectorized hash aggregator is disabled.
HashJoinHintUseCounter is to be incremented whenever a query specifies a hash join via a query hint.
HashShardedIndexCounter is to be incremented every time a hash sharded index is created.
IfErrCounter is to be incremented upon type checking an IFERROR(...) expression or analogous.
ImportIntoMultiRegionDatabaseCounter is to be incremented when an import statement is run against a multi-region database.
IndexHintDeleteUseCounter is to be incremented whenever a query specifies an index hint in a DELETE.
IndexHintSelectUseCounter is to be incremented whenever a query specifies an index hint in a SELECT.
IndexHintUpdateUseCounter is to be incremented whenever a query specifies an index hint in an UPDATE.
IndexHintUseCounter is to be incremented whenever a query specifies an index hint.
InterleavedPortalRequestCounter is to be incremented every time an open portal attempts to interleave work with another portal.
InvertedIndexCounter is to be incremented every time an inverted index is created.
InvertedJoinHintUseCounter is to be incremented whenever a query specifies an inverted join via a query hint.
JoinAlgoCrossUseCounter is to be incremented whenever a cross join node is planned.
JoinAlgoHashUseCounter is to be incremented whenever a hash join node is planned.
JoinAlgoLookupUseCounter is to be incremented whenever a lookup join node is planned.
JoinAlgoMergeUseCounter is to be incremented whenever a merge join node is planned.
JoinTypeAntiUseCounter is to be incremented whenever an anti-join node is planned.
JoinTypeFullUseCounter is to be incremented whenever a full outer join node is planned.
JoinTypeInnerUseCounter is to be incremented whenever an inner join node is planned.
JoinTypeLeftUseCounter is to be incremented whenever a left or right outer join node is planned.
JoinTypeSemiUseCounter is to be incremented whenever a semi-join node is planned.
JSONBSubscriptCounter is to be incremented upon type checking an JSONB subscript expression x[...].
LargeLShiftArgumentCounter is to be incremented upon evaluating a scalar expressions a << b when b is larger than 64 or negative.
LargeRShiftArgumentCounter is to be incremented upon evaluating a scalar expressions a >> b when b is larger than 64 or negative.
LateralJoinUseCounter is to be incremented whenever a query uses the LATERAL keyword.
LegacySchemaChangerCounter is incremented whenever the legacy schema changer is used.
LocalityOptimizedSearchUseCounter is to be incremented whenever a locality optimized search node is planned.
LookupJoinHintUseCounter is to be incremented whenever a query specifies a lookup join via a query hint.
MergeJoinHintUseCounter is to be incremented whenever a query specifies a merge join via a query hint.
MixedDDLDMLTransactionFailureCounter is incremented whenever an explicit transaction that has both DDL and DML statements fails.
MixedDDLDMLTransactionSuccessCounter is incremented whenever an explicit transaction that has both DDL and DML statements succeeds.
MultiColumnInvertedIndexCounter is to be incremented every time a multi-column inverted index is created.
NotReadOnlyStmtsTriedWithPausablePortals is to be incremented every time there's a not-internal not-read-only statement executed with a pgwire portal and the session variable multiple_active_portals_enabled has been set to true.
OrderByNullsNonStandardCounter is to be incremented whenever a non-standard ordering of nulls is used for ORDER BY (either ASC NULLS LAST or DESC NULLS FIRST).
OrderByNullsStandardCounter is to be incremented whenever a standard ordering of nulls is used for ORDER BY (either ASC NULLS FIRST or DESC NULLS LAST).
OverrideMultiRegionDatabaseZoneConfigurationSystem is to be incremented when a multi-region database zone configuration is overridden by the system.
OverrideMultiRegionTableZoneConfigurationSystem is to be incremented when a multi-region table/index/partition zone configuration is overridden by the system.
OverrideMultiRegionZoneConfigurationUser is to be incremented when a multi-region zone configuration is overridden by the user.
ParseRequestCounter is to be incremented every time a parse request is made.
PartialIndexCounter is to be incremented every time a partial index is created.
PartialIndexLookupJoinUseCounter is to be incremented whenever a lookup join on a partial index is planned.
PartialIndexScanUseCounter is to be incremented whenever a partial index scan node is planned.
PartialInvertedIndexCounter is to be incremented every time a partial inverted index is created.
PartitionedInvertedIndexCounter is to be incremented every time a partitioned inverted index is created.
PlanTypeAutoCustomCounter is to be incremented whenever a generic plan is used when plan_cache_mode=auto.
PlanTypeAutoGenericCounter is to be incremented whenever a custom plan is used when plan_cache_mode=auto.
PlanTypeForceCustomCounter is to be incremented whenever a custom plan is used when plan_cache_mode=force_custom_plan.
PlanTypeForceGenericCounter is to be incremented whenever a generic plan is used when plan_cache_mode=force_generic_plan.
PortalWithLimitRequestCounter is to be incremented every time a portal request is made.
RecursionDepthLimitReached is to be incremented whenever the limit of nested triggers and/or recursive UDFs for a single query is exceeded.
RecursiveCteUseCounter is to be incremented every time a recursive CTE (WITH RECURSIVE...) is planned without error in a query.
RowLevelTTLCreated is incremented when a row level TTL table is created.
RowLevelTTLDropped is incremented when a row level TTL has been dropped from a table.
RowLevelTTLExecuted is incremented when a row level TTL job has executed.
SchemaChangeInExplicitTxnCounter is to be incremented every time a schema change is scheduled using an explicit transaction.
SchemaRefreshMaterializedView is to be incremented every time a materialized view is refreshed.
SchemaTelemetryExecuted is incremented when a schema telemetry job has executed.
SecondaryIndexColumnFamiliesCounter is a counter that is incremented every time a secondary index that is separated into different column families is created.
SetInitialPrimaryRegionCounter is to be incremented when a multi-region database is created using ALTER DATABASE ..
StatementDiagnosticsCollectedCounter is to be incremented whenever a query is run with diagnostic collection (as a result of a user request through the UI).
StatsHistogramOOMCounter is to be incremented whenever statistics histogram generation is disabled due to an out of memory error.
StmtsTriedWithPausablePortals is to be incremented every time there's a not-internal statement executed with a pgwire portal and the session variable multiple_active_portals_enabled has been set to true.
StraightJoinHintUseCounter is to be incremented whenever a query specifies a straight join via a query hint.
SubOrPostQueryStmtsTriedWithPausablePortals is to be incremented every time there's a not-internal statement with post or sub queries executed with a pgwire portal and the session variable multiple_active_portals_enabled has been set to true.
SubqueryUseCounter is to be incremented every time a subquery is planned.
SwitchPrimaryRegionCounter is to be incremented when a multi-region database has its primary region changed.
TempObjectCleanerDeletionCounter is to be incremented every time a temporary schema has been deleted by the temporary object cleaner.
TrigramInvertedIndexCounter is to be incremented every time a trigram inverted index is created.
TupleCastCounter is to be incremented when type checking all casts that involve tuples.
TurnAuthAuditingOffUseCounter counts how many time connection audit logs were disabled.
TurnAuthAuditingOnUseCounter counts how many time connection audit logs were enabled.
TurnAutoStatsOffUseCounter is to be incremented whenever automatic stats collection is explicitly disabled.
TurnAutoStatsOnUseCounter is to be incremented whenever automatic stats collection is explicitly enabled.
TurnConnAuditingOffUseCounter counts how many time connection audit logs were disabled.
TurnConnAuditingOnUseCounter counts how many time connection audit logs were enabled.
UncategorizedErrorCounter is to be incremented every time an error flows to the client without having been decorated with a pg error.
UniqueChecksUseCounter is to be incremented every time a mutation has unique checks and the checks are planned by the optimizer.
VecExecCounter is to be incremented whenever a query runs with the vectorized execution engine.
# Type aliases
EnumTelemetryType represents a type of ENUM related operation to record telemetry for.
PartitioningTelemetryType is an enum used to represent the different partitioning related operations that we are recording telemetry for.
ShowTelemetryType is an enum used to represent the different show commands that we are recording telemetry for.
UserDefinedSchemaTelemetryType represents a type of user defined schema related operation to record telemetry for.