-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BACKPORT pg15-cherrypicks][#23707] Add table name to /metrics JSON e…
…ndpoint Summary: Original commit: 9c1cc23 / D37636 The `/metrics` endpoint does not show the table name for the table-level metrics added in D35792. This revision adds the table name JSON field. Test Plan: ``` ./yb_build.sh --cxx-test pgwrapper_pg_libpq-test --gtest_filter PgLibPqTest.CatalogCacheIdMissMetricsTest ``` Manual test: ``` bin/yb-ctl create bin/ysqlsh yugabyte=# create table test(a int); CREATE TABLE yugabyte=# \c You are now connected to database "yugabyte" as user "yugabyte". yugabyte=# select * from t; a --- (0 rows) yugabyte=# \q wget 'http://127.0.0.1:13000/metrics?reset_histograms=false&show_help=false' -O - 2>/dev/null | jq '.[] | select(.id == "yb.ysqlserver") | .metrics[] | select(.table_name != null)' { "name": "handler_latency_yb_ysqlserver_SQLProcessor_CatalogCacheMisses", "count": 0, "sum": 0, "rows": 0, "table_name": "pg_aggregate_fnoid_index" } { "name": "handler_latency_yb_ysqlserver_SQLProcessor_CatalogCacheMisses", "count": 0, "sum": 0, "rows": 0, "table_name": "pg_am_name_index" } { "name": "handler_latency_yb_ysqlserver_SQLProcessor_CatalogCacheMisses", "count": 0, "sum": 0, "rows": 0, "table_name": "pg_am_oid_index" } { "name": "handler_latency_yb_ysqlserver_SQLProcessor_CatalogCacheMisses", "count": 0, "sum": 0, "rows": 0, "table_name": "pg_amop_opr_fam_index" } ... { "name": "handler_latency_yb_ysqlserver_SQLProcessor_CatalogCacheTableMisses", "count": 0, "sum": 0, "rows": 0, "table_name": "pg_aggregate" } { "name": "handler_latency_yb_ysqlserver_SQLProcessor_CatalogCacheTableMisses", "count": 0, "sum": 0, "rows": 0, "table_name": "pg_am" } { "name": "handler_latency_yb_ysqlserver_SQLProcessor_CatalogCacheTableMisses", "count": 0, "sum": 0, "rows": 0, "table_name": "pg_amop" } ... ``` Reviewers: jason, tfoucher Reviewed By: jason Subscribers: yql, svc_phabricator Differential Revision: https://phorge.dev.yugabyte.com/D37966
- Loading branch information
Showing
2 changed files
with
100 additions
and
46 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