Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sql: Added telemetry for pg_catalog and information_schema tables access #60511

Merged
merged 1 commit into from
Feb 16, 2021

Conversation

mnovelodou
Copy link
Contributor

Previously, when querying a not implemented table it was tracket by telemetry
This was inadequate because when adding these tables as empty tables we no longer capture the access of these tables that are empty and unsupported
To address this, this patch adds telemetry to track queries at pg_catalog and
information_schema existing tables

Release note (sql change): Added telemetry to track usage of pg_catalog and
information_schema tables

Fixes #58732

@blathers-crl
Copy link

blathers-crl bot commented Feb 11, 2021

Thank you for contributing to CockroachDB. Please ensure you have followed the guidelines for creating a PR.

My owl senses detect your PR is good for review. Please keep an eye out for any test failures in CI.

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is otan.

@blathers-crl blathers-crl bot added the O-community Originated from the community label Feb 11, 2021
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@mnovelodou mnovelodou force-pushed the virtual-schema-telemetry branch from d18f310 to 1f3e935 Compare February 12, 2021 16:16
@blathers-crl
Copy link

blathers-crl bot commented Feb 12, 2021

Thank you for updating your pull request.

My owl senses detect your PR is good for review. Please keep an eye out for any test failures in CI.

🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is otan.

@mnovelodou mnovelodou force-pushed the virtual-schema-telemetry branch from 1f3e935 to 34ef444 Compare February 12, 2021 17:02
Copy link
Contributor

@solongordon solongordon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Glad this was straightforward! LGTM pending a couple minor changes.

Reviewed 1 of 4 files at r1.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @mnovelodou)


pkg/sql/sqltelemetry/virtual_schema.go, line 19 at r1 (raw file):

)

const getVirtualSchemaEntry = "sql.virtual_schema.get_virtual_table_entry.%s.%s"

Let's name this sql.schema.get_virtual_table.%s.%s.


pkg/sql/sqltelemetry/virtual_schema.go, line 22 at r1 (raw file):

// trackedSchemas have the schemas that we track by
// telemetry.

Nit: We usually wrap comments at 80 chars.

@mnovelodou mnovelodou force-pushed the virtual-schema-telemetry branch from 34ef444 to e653025 Compare February 12, 2021 18:29
Copy link
Contributor Author

@mnovelodou mnovelodou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @solongordon)


pkg/sql/sqltelemetry/virtual_schema.go, line 19 at r1 (raw file):

Previously, solongordon (Solon) wrote…

Let's name this sql.schema.get_virtual_table.%s.%s.

Done.

Previously, when querying a not implemented table it was tracket by telemetry
This was inadequate because when adding these tables as empty tables we no longer capture the access of these tables that are empty and unsupported
To address this, this patch adds telemetry to track queries at pg_catalog and
information_schema existing tables

Release note (sql change): Added telemetry to track usage of pg_catalog and
information_schema tables

Fixes cockroachdb#58732
@mnovelodou mnovelodou force-pushed the virtual-schema-telemetry branch from e653025 to bd760b0 Compare February 12, 2021 20:10
@solongordon
Copy link
Contributor

bors r+

@craig
Copy link
Contributor

craig bot commented Feb 16, 2021

Build succeeded:

@craig craig bot merged commit 314afa3 into cockroachdb:master Feb 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-community Originated from the community
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sql: Add telemetry for pg_catalog queries
3 participants