Skip to content

Support TiFlash Metrics with keyspace info and adjust schema metrics#7679

Merged
ti-chi-bot[bot] merged 9 commits intopingcap:masterfrom
hongyunyan:hongyunyan_ddl_metrics
Jun 20, 2023
Merged

Support TiFlash Metrics with keyspace info and adjust schema metrics#7679
ti-chi-bot[bot] merged 9 commits intopingcap:masterfrom
hongyunyan:hongyunyan_ddl_metrics

Conversation

@hongyunyan
Copy link
Contributor

@hongyunyan hongyunyan commented Jun 19, 2023

What problem does this PR solve?

Issue Number: close #7640

Problem Summary:

What is changed and how it works?

  1. expand our metrics infrasutrature, to make it support keyspace info
  2. make schema metrics contains keyspace info and adjust the grafana json files.

Now, the grafana for ddl part looks like:
image

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

None

@ti-chi-bot ti-chi-bot bot added release-note-none Denotes a PR that doesn't merit a release note. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jun 19, 2023
@ti-chi-bot ti-chi-bot bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jun 19, 2023
@hongyunyan
Copy link
Contributor Author

/cc @JaySon-Huang @lidezhu

@ti-chi-bot ti-chi-bot bot requested review from JaySon-Huang and lidezhu June 19, 2023 09:49
@hongyunyan
Copy link
Contributor Author

/run-all-tests


const auto old_mapped_tbl_name = storage->getTableName();
GET_METRIC(tiflash_schema_internal_ddl_count, type_rename_column).Increment();
GET_KEYSPACE_METRIC(tiflash_schema_internal_ddl_count, type_modify_column, keyspace_id).Increment();
Copy link
Contributor

@JaySon-Huang JaySon-Huang Jun 19, 2023

Choose a reason for hiding this comment

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

this should be type_rename_table?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fix

"format": "time_series",
"intervalFactor": 1,
"legendFormat": "{{type}}",
"legendFormat": "{{type-keyspace}}",
Copy link
Contributor

Choose a reason for hiding this comment

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

should it be

Suggested change
"legendFormat": "{{type-keyspace}}",
"legendFormat": "{{type}}-{{keyspace}}",

"format": "time_series",
"intervalFactor": 1,
"legendFormat": "{{instance}}",
"legendFormat": "{{instance-keyspace}}",
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

@hongyunyan
Copy link
Contributor Author

/run-all-tests

Copy link
Contributor

@lidezhu lidezhu left a comment

Choose a reason for hiding this comment

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

LGTM

@ti-chi-bot ti-chi-bot bot added needs-1-more-lgtm Indicates a PR needs 1 more LGTM. approved labels Jun 19, 2023
@lidezhu
Copy link
Contributor

lidezhu commented Jun 19, 2023

/run-all-tests

1 similar comment
@hongyunyan
Copy link
Contributor Author

/run-all-tests

@ti-chi-bot ti-chi-bot bot added the lgtm label Jun 20, 2023
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Jun 20, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: JaySon-Huang, lidezhu

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:
  • OWNERS [JaySon-Huang,lidezhu]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ti-chi-bot ti-chi-bot bot removed the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Jun 20, 2023
@ti-chi-bot
Copy link
Contributor

ti-chi-bot bot commented Jun 20, 2023

[LGTM Timeline notifier]

Timeline:

  • 2023-06-19 13:51:56.879873478 +0000 UTC m=+24482.281123926: ☑️ agreed by lidezhu.
  • 2023-06-20 06:54:25.05348583 +0000 UTC m=+85830.454736279: ☑️ agreed by JaySon-Huang.

@JaySon-Huang
Copy link
Contributor

/run-integration-test

@JaySon-Huang
Copy link
Contributor

/run-integration-test

@JaySon-Huang
Copy link
Contributor

/rebuild

@JaySon-Huang
Copy link
Contributor

/run-integration-test

@hongyunyan
Copy link
Contributor Author

/run-all-tests

@ti-chi-bot ti-chi-bot bot merged commit 4ecf3cd into pingcap:master Jun 20, 2023
@SeaRise
Copy link
Contributor

SeaRise commented Jun 25, 2023

It looks like the metrics for query level should also include keyspace info, such as coprocess and mpp.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved lgtm release-note-none Denotes a PR that doesn't merit a release note. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enhance TiFlashMetrics containing keyspace info

4 participants