Skip to content

metrics/nextgengrafana: display keyspace separately#61823

Merged
ti-chi-bot[bot] merged 2 commits intopingcap:masterfrom
tiancaiamao:grafana
Jun 24, 2025
Merged

metrics/nextgengrafana: display keyspace separately#61823
ti-chi-bot[bot] merged 2 commits intopingcap:masterfrom
tiancaiamao:grafana

Conversation

@tiancaiamao
Copy link
Contributor

What problem does this PR solve?

Issue Number: ref #58720

Problem Summary:

I'm checking the grafana about the GC related metrics on NextGen
Currently if we load the file metrics/nextgengrafana/tidb_with_keyspace_name.json, data from all keyspaces are mixed!

Since each keyspace works just like a tenant's cluster, we should display for each of them.

What changed and how does it work?

Here is the operations to get the new json based on the old one.

  1. load the old tidb_with_keyspace_name.json file
  2. Dashboard Settings -> Variable -> add the keyspace_name variable so it can be used as $keyspace_name
  3. Dashboard Settings -> Save Dashboard
  4. Shard dashboard or panel -> Export -> Export for sharing externally -> Save to file
  5. open the saved json file, pattern match and replace, add "keyspace_name=$keyspace_name" to every expression
  6. Reload the new modified json file, check it works correctly.

Check List

Tests

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

load the new json file, there will be a keyspace_name button:
image

switch this button, it displays data for different keyspace:
image

image image
  • No need to test
    • I checked and no code files have been changed.

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

Please refer to Release Notes Language Style Guide to write a quality 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, 2025
@tiprow
Copy link

tiprow bot commented Jun 19, 2025

Hi @tiancaiamao. Thanks for your PR.

PRs from untrusted users cannot be marked as trusted with /ok-to-test in this repo meaning untrusted PR authors can never trigger tests themselves. Collaborators can still trigger tests on the PR using /test all.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@yibin87
Copy link
Contributor

yibin87 commented Jun 19, 2025

/cc @kaaaaaaang

@ti-chi-bot ti-chi-bot bot requested a review from kaaaaaaang June 19, 2025 01:58
@codecov
Copy link

codecov bot commented Jun 19, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.6284%. Comparing base (8e6d77a) to head (08336cf).
Report is 37 commits behind head on master.

Additional details and impacted files
@@               Coverage Diff                @@
##             master     #61823        +/-   ##
================================================
+ Coverage   73.0498%   73.6284%   +0.5786%     
================================================
  Files          1730       1736         +6     
  Lines        481655     491249      +9594     
================================================
+ Hits         351848     361699      +9851     
+ Misses       108260     107961       -299     
- Partials      21547      21589        +42     
Flag Coverage Δ
integration 42.8474% <ø> (?)
unit 72.7126% <ø> (+0.4243%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
dumpling 52.7804% <ø> (ø)
parser ∅ <ø> (∅)
br 46.1865% <ø> (-0.3942%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@MyonKeminta MyonKeminta left a comment

Choose a reason for hiding this comment

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

By the way did you verify if this still work properly by default in an OP (non-keyspaced) deployment?

@yibin87
Copy link
Contributor

yibin87 commented Jun 19, 2025

Better to adjust other _with_keyspace_name.json files also:)

Copy link
Contributor

@yibin87 yibin87 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 the needs-1-more-lgtm Indicates a PR needs 1 more LGTM. label Jun 20, 2025
@tiancaiamao
Copy link
Contributor Author

/retest

@tiprow
Copy link

tiprow bot commented Jun 23, 2025

@tiancaiamao: Cannot trigger testing until a trusted user reviews the PR and leaves an /ok-to-test message.

Details

In response to this:

/retest

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@MyonKeminta
Copy link
Contributor

It was not known to me until reviewing this PR that there are these "KeyspaceName" grafana files, in which the contents are mostly the same as non "KeyspaceName" ones except that it distinguishes keyspaces.
I have a question: how can we make sure the contents of the corresponding "KeyspaceName" dashboards and non-"KeyspaceName" dashboards are consistent, or to say, prevent people to modify one of them forgetting the other?
@yibin87

Copy link
Contributor

@MyonKeminta MyonKeminta left a comment

Choose a reason for hiding this comment

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

I have no more opinion for this PR itself. LGTM.

@ti-chi-bot
Copy link

ti-chi-bot bot commented Jun 24, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: MyonKeminta, yibin87

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:

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 added approved lgtm and removed needs-1-more-lgtm Indicates a PR needs 1 more LGTM. labels Jun 24, 2025
@ti-chi-bot
Copy link

ti-chi-bot bot commented Jun 24, 2025

[LGTM Timeline notifier]

Timeline:

  • 2025-06-20 09:18:56.279122915 +0000 UTC m=+436189.002301882: ☑️ agreed by yibin87.
  • 2025-06-24 04:21:00.863248917 +0000 UTC m=+763913.586427901: ☑️ agreed by MyonKeminta.

@ti-chi-bot ti-chi-bot bot merged commit cadde3a into pingcap:master Jun 24, 2025
24 checks passed
@tiancaiamao tiancaiamao deleted the grafana branch June 24, 2025 08:55
morgo added a commit to morgo/tidb that referenced this pull request Jun 24, 2025
* origin/master: (129 commits)
  domain: Fix the issue that the min start ts doesn't correctly block keyspace-level GC (pingcap#61925)
  br: better control pd scheduler pause during log restore with filter (pingcap#61819)
  session: rename circuit breaker sysvar (pingcap#61951)
  dxfservice: create store for SYSTEM keyspace (pingcap#61752)
  docs: fix a dead link in CONTRIBUTORS.md (pingcap#61923)
  metrics/nextgengrafana: display keyspace separately (pingcap#61823)
  lightning: fix length check may be skipped for first line (pingcap#61874)
  planner: support `explain [analyze] <plan_digest>` for `explain explore` (pingcap#61942)
  planner: record explored plans into `tidb_statement_stats` when running `explain explore` (pingcap#61850)
  fix(runaway): ensure DistSQLContext's checker is synchronized with session variables (pingcap#61907)
  expression,planner: reuse the propOuterJoinConstSolver to improve performance (pingcap#61913)
  ddl,planner: remove unused and meaningless code (pingcap#61936)
  planner: remove unused field from physicalTableScan. (pingcap#61935)
  workload-learning: Extract metrics from cluster statements stats (pingcap#61378)
  executor: minor cleanup in builder.go (pingcap#61924)
  session: rename GetDomainInfoSchema to GetLatestInfoSchema (pingcap#61894)
  ingest: retry failed regions when batch scatter regions (pingcap#61722)
  planner: add tpch q1,q2,q3 benchmark (pingcap#61898)
  planner: fix uninit timeout for loading bindings (pingcap#61891)
  executor: report error when admin check on multiple tables (pingcap#61828)
  ...
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/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants