Skip to content

Commit

Permalink
add Observability part
Browse files Browse the repository at this point in the history
Signed-off-by: y_static_y@sina.com <y_static_y@sina.com>
  • Loading branch information
ystaticy committed Oct 29, 2024
1 parent 657e401 commit 9d7af9e
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions docs/design/2022-12-07-keyspace.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,14 @@ Previously, there was only one GCWorker leader for GC in the entire PD and TiKV

* When a specified keyspace uses keyspace level GC, this keyspace will have its own GCWorker leader that computes its own GC safe point, resolves locks, and deletes ranges. The keyspace level safe point information is stored in PD, isolated by the keyspace prefix, and only GC the data within its keyspace range, without affecting other keyspaces.

#### Observability

Keyspace observability is essential for understanding and managing performance effectively.

1. Metric Filtering: TiDB metrics can be filtered by the `keyspace_id` label for precise monitoring.
2. Grafana Setup: Add a query box for `keyspace_id` in Grafana dashboards to visualize data specific to each keyspace.
3. Log Enhancement: Include the `keyspace_name` label in TiDB logs for better tracking and context in log analysis.

### TiKV

`Keyspace` can only be used when TiKV [enabled API V2](https://github.com/tikv/rfcs/blob/master/text/0069-api-v2.md#tikv-server).
Expand Down Expand Up @@ -200,11 +208,3 @@ TiFlash requests carry the keyspace prefix. TiFlash parses `<KeyspaceID, TableID
### Placement Rules

Placement rules are isolated by keyspace. TiDB must name placement rules using the keyspace prefix, such as `keyspace-<keyspace_id>-xxxx`. Additionally, the key range of some rules must be encoded.

### Observability

Keyspace observability is essential for understanding and managing performance effectively.

1. Metric Filtering: TiDB metrics can be filtered by the `keyspace_id` label for precise monitoring.
2. Grafana Setup: Add a query box for `keyspace_id` in Grafana dashboards to visualize data specific to each keyspace.
3. Log Enhancement: Include the `keyspace_name` label in TiDB logs for better tracking and context in log analysis.

0 comments on commit 9d7af9e

Please sign in to comment.