# TiDB-X Support Overview

## Goal

The feature goal is to extend Metrics Integration from Dedicated-only support to TiDB-X support for:

- Premium
- Essential
- Starter

Both existing service paths must work for these plans:

- OTel pipeline for Datadog and NewRelic
- Prometheus pipeline

`release/20260320` records the main-branch baseline before TiDB-X support.

## Core Design Targets

1. Global cluster metadata lookup must stop depending on `core-svc` and use `tidb-mgmt` so TiDB-X cluster metadata can be resolved correctly.
2. Datasource logic must account for TiDB-X topology differences:
   TiDB metrics remain cluster-facing, while TiKV and TiFlash storage metrics are queried from shared resource-pool series.
3. Query matcher semantics are service-plan aware:
   Premium currently uses `tidb_cluster_id`.
   Essential and Starter use `cluster_id` for TiDB-layer metrics.
   Shared-series lookup may require `cluster_id -> keyspace_id` resolution.
4. Exported metrics must follow TiDB-X product semantics:
   pod concepts such as `tidb-1` and `tidb-2` are not exposed to users.
   `cluster_id` and `cluster_name` become `instance_id` and `instance_name`.
   project-level concepts are removed from exported TiDB-X metrics.

## Implementation Boundaries

- Dedicated compatibility remains a hard requirement.
- TiDB-X support is for Premium, Essential, and Starter.
- DM is not part of the current TiDB-X launch scope.

## Document Map

1. `02-cluster-metadata-and-service-plan.md`
   control-plane dependency and service-plan foundation
2. `03-datasource-routing-and-query-semantics.md`
   bizType routing, matcher rules, and keyspace-aware shared-series queries
3. `04-metric-output-and-coverage.md`
   exported labels, metric scope, and Dedicated compatibility baseline
4. `05-validation-and-rollout.md`
   launch validation, rollout checks, and operational readiness
5. `06-tidb-mgmt-migration-design.md`
   standalone design for the `core-svc` -> `tidb-mgmt` migration
6. `07-pipeline-backfill-batching-design.md`
   standalone design for bounded catch-up behavior
7. `08-pipeline-update-design.md`
   pipeline update behavior introduced around this refactor
8. `troubleshooting/alicloud-ingress-alb-dns-deployment-notes.md`
   Alibaba Cloud deployment notes for ALB, Ingress, DNS, and cert-manager bootstrap
9. `check/dedicated-regression-check/`
   Dedicated output comparison against `release/20260320`
10. `release/2026-03-15-e2e-test-report-template.md`
   rollout evidence template for end-to-end validation
