Skip to content

Create Statement Insight - #23486

Open
huoyao1125 wants to merge 3 commits into
release-8.5from
huoyao1125-patch-2
Open

Create Statement Insight#23486
huoyao1125 wants to merge 3 commits into
release-8.5from
huoyao1125-patch-2

Conversation

@huoyao1125

@huoyao1125 huoyao1125 commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

First-time contributors' checklist

What is changed, added or deleted? (Required)

Which TiDB version(s) do your changes apply to? (Required)

Tips for choosing the affected version(s):

By default, CHOOSE MASTER ONLY so your changes will be applied to the next TiDB major or minor releases. If your PR involves a product feature behavior change or a compatibility change, CHOOSE THE AFFECTED RELEASE BRANCH(ES) AND MASTER.

For details, see tips for choosing the affected versions.

  • master (the latest development version)
  • v9.0 (TiDB 9.0 versions)
  • v8.5 (TiDB 8.5 versions)
  • v8.1 (TiDB 8.1 versions)
  • v7.5 (TiDB 7.5 versions)
  • v7.1 (TiDB 7.1 versions)
  • v6.5 (TiDB 6.5 versions)

What is the related PR or file link(s)?

  • This PR is translated from:
  • Other reference link(s):

AI agent involvement

  • The changes in this PR were primarily made by an AI agent on behalf of the PR author.

Do your changes match any of the following descriptions?

  • Delete files
  • Change aliases
  • Need modification after applied to another branch
  • Might cause conflicts after applied to another branch

Summary by CodeRabbit

  • Documentation
    • Added a preview-marked Statement Insight page to the TiDB Cloud Premium documentation.
    • Documented access steps, historical data collection, filters, RU and latency metrics, execution details, dimensional summaries, leaderboards, and trend charts.
    • Added information about limitations, data retention, and FAQs comparing Statement Insight with Top RU and billing data.
    • Added Statement Insight to the Monitor and Alert table of contents.

@ti-chi-bot

ti-chi-bot Bot commented Aug 10, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign qiancai for approval. For more information see the Code Review Process.
Please ensure that each of them provides their approval before proceeding.

The full list of commands accepted by this bot can be found 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 missing-translation-status This PR does not have translation status info. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Aug 10, 2026
@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

The PR adds a Statement Insight documentation page and links it from the TiDB Cloud Premium table of contents. The page covers access, filters, metrics, charts, limitations, and FAQs.

Changes

Statement Insight

Layer / File(s) Summary
Statement Insight access and navigation
tidb-cloud/statement-insight.md, TOC-tidb-cloud-premium.md
The page documents preview availability, historical data behavior, prerequisites, and console access. The table of contents adds a Preview-labeled link under Monitor and Alert.
Statement Insight analysis and FAQs
tidb-cloud/statement-insight.md
The page documents filters, SQL Overview metrics, dimensional summaries, trend charts, data freshness, aggregation limits, and differences from Top RU and billing data.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Suggested labels: area/tidb-cloud

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description retains the template but provides no change summary, version selection, links, or other required information. Add the change summary, select the applicable TiDB version, and complete the reference, AI involvement, and change-type sections.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: adding Statement Insight documentation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch huoyao1125-patch-2

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 1179b5d9-f382-43f8-9471-a12f0a5f6811

📥 Commits

Reviewing files that changed from the base of the PR and between 84444c6 and 2f87b4e.

📒 Files selected for processing (1)
  • tidb-cloud/Statement Insight

Comment thread tidb-cloud/Statement Insight Outdated
@@ -0,0 +1 @@

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟠 Major | 🏗️ Heavy lift

Add the requested documentation content before merging.

tidb-cloud/Statement Insight contains only blank lines. This change does not implement the PR objective to add “Create Statement Insight” documentation.

Adds the Statement Insight (Preview) page for TiDB Cloud Premium,
covering multi-dimensional RU/latency/execution-count analysis by
DB User, SQL Type, and SQL Digest, and registers it in the Premium
navigation.
@ti-chi-bot ti-chi-bot Bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Aug 10, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: fd15e83c-9a79-42d0-80f2-c0583b5bcd3d

📥 Commits

Reviewing files that changed from the base of the PR and between 2f87b4e and 2aec0d9.

📒 Files selected for processing (2)
  • TOC-tidb-cloud-premium.md
  • tidb-cloud/statement-insight.md

Comment thread tidb-cloud/statement-insight.md Outdated

- **Time range**: select a preset interval or a custom range.

- The earliest available start date depends on your data retention: **90 days ago** for {{{ .premium }}} instances.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Use the feature activation date as the lower bound.

Line 36 says that the earliest date is always 90 days ago. Lines 20-23 state that collection starts only when the feature is enabled and that historical data is not backfilled. For a newly enabled instance, the earliest date is therefore the activation date, not 90 days ago.

Suggested change
- The earliest available start date depends on your data retention: **90 days ago** for {{{ .premium }}} instances.
- The earliest available start date is the later of the feature activation date and **90 days ago** for {{{ .premium }}} instances.

As per path instructions, “For every actionable issue, provide a GitHub committable suggestion block containing the exact replacement text whenever the fix can be safely and completely applied to contiguous lines in the diff.”

Source: Path instructions

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: b6daf13b-b7fb-43bb-83dc-4ef9186dcf2e

📥 Commits

Reviewing files that changed from the base of the PR and between 2aec0d9 and 1000511.

📒 Files selected for processing (1)
  • tidb-cloud/statement-insight.md

Comment thread tidb-cloud/statement-insight.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

missing-translation-status This PR does not have translation status info. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant