pingcap / pingcap/tidb

Migrate remaining Grafana dashboard JSONs to Jsonnet

Open
#65,763 2 comments 1 reaction 0 assignees View on GitHub
type/enhancement
Dominant language
Go
Stars
40.5k
Forks
6.2k
PR merge metrics
PR metrics pending

Description

## Enhancement

Migrate remaining Grafana dashboard JSON files to Jsonnet for consistency and maintainability.

TODO:
- [ ] [`pkg/metrics/grafana/tidb.json` → tidb.jsonnet](https://github.com/pingcap/tidb/pull/65764)
- [ ] `pkg/metrics/grafana/overview.json` → jsonnet
- [ ] `pkg/metrics/grafana/performance_overview.json` → jsonnet
- [ ] `pkg/metrics/grafana/tidb_runtime.json` → jsonnet

Note:

For TiDB, we have already used Jsonnet for other metrics, so let's adapt it.

The prompt I used:

```console
I want you to follow what we did in tidb_summary.jsonnet and create tidb.jsonnet.
Migrate it row by row; for each row, you need to commit it separately.
Build a plan table in tidb.md. Make sure you do it one by one and record the progress.
For each migration, you should generate the JSON and compare it with the original JSON to ensure you haven't changed any meaningful content compared to the original(Ignore UI differences; focus on the content). If you made any changes, be sure to fix them before committing. Additionally, record the verification progress in the markdown file. Never directly copy the raw JSON. The purpose of this migration is to use Jsonnet to maintain the JSON file. So make sure each commit includes the incrementally generated JSON changes.

Check generate_json.sh to see how we generate the JSON file.

Each commit will be reviewed by humans. Please ensure you record the progress so that I can ask other AI to continue the work from any point.

The files I need:
1. tidb.json (Keep the original one)
2. tidb.new.json (Incremental generated)
3. tidb.md(Progress; the rest of the work can be easily picked up.)

To make it easier to review, we should use a separate libsonnet file for each row and import it into one jsonnet file.

Every time you finish one row, wait for approval to continue to the next one.

Check the current progress and continue.
```

I burned all my Claude code tokens, then I used my Codex to take over the reset jobs. It records all progress, making it easy to switch models and tools to complete the work.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.