# TiDB X Metrics Integration E2E Test Report Template

## Document Info

| Field | Content |
| --- | --- |
| Report Title | `<example: TiDB X Metrics Integration E2E Test Report - Dev>` |
| Test Version | `<feature branch / commit / tag>` |
| Baseline Version | `<main branch commit, required for Dedicated only>` |
| Test Environment | `<dev / staging / prod-like>` |
| Test Time | `<YYYY-MM-DD HH:mm UTC>` |
| Tester | `<name>` |
| Report Status | `<Draft / Final>` |

## 1. Test Goals

This test validates the following end-to-end loop:

- `Dedicated`, `Premium`, `Essential`, and `Starter` all show data through:
  - `Prometheus`
  - `Datadog`
  - `New Relic`
- each path includes platform-side screenshots and key metric validation
- `Dedicated` additionally checks whether `feature` output differs from `main`

## 2. Test Scope

### 2.1 Service Plan Coverage

| Service Plan | Cluster ID | Region | Cloud | Case Status |
| --- | --- | --- | --- | --- |
| Dedicated | `<cluster-id>` | `<region>` | `<cloud>` | `<PASS/FAIL/BLOCKED>` |
| Premium | `<cluster-id>` | `<region>` | `<cloud>` | `<PASS/FAIL/BLOCKED>` |
| Essential | `<cluster-id>` | `<region>` | `<cloud>` | `<PASS/FAIL/BLOCKED>` |
| Starter | `<cluster-id>` | `<region>` | `<cloud>` | `<PASS/FAIL/BLOCKED>` |

### 2.2 Observability Platform Coverage

| Platform | Validation Method | Result |
| --- | --- | --- |
| Prometheus | local scrape / Grafana dashboard / query endpoint | `<PASS/FAIL/BLOCKED>` |
| Datadog | Integration + Dashboard + Metrics Explorer | `<PASS/FAIL/BLOCKED>` |
| New Relic | Integration + Dashboard + Query Builder / NRQL | `<PASS/FAIL/BLOCKED>` |

## 3. Preconditions

### 3.1 Code and Config

- Feature version: `<branch / commit>`
- Main version: `<branch / commit>`
- Local validation guide: `docs/test/2026-03-15-local-validate-workspace-guide.en.md`
- Real platform guide: `docs/test/2026-03-15-local-validate-real-observability-guide.en.md`

### 3.2 Credentials and External Dependencies

- TiDB Cloud API available: `<yes/no>`
- Datadog API key available: `<yes/no>`
- New Relic API key available: `<yes/no>`
- Grafana available: `<yes/no>`

### 3.3 Local Validation Artifacts

| Check Item | Path | Result | Notes |
| --- | --- | --- | --- |
| Prometheus output | `<test-results/.../prometheus/...txt>` | `<PASS/FAIL>` | `<...>` |
| OTel Datadog output | `<test-results/.../otel-dd/...ndjson>` | `<PASS/FAIL>` | `<...>` |
| OTel New Relic output | `<test-results/.../otel-nr/...ndjson>` | `<PASS/FAIL>` | `<...>` |

## 4. Summary

### 4.1 Overall Result Matrix

| Service Plan | Prometheus | Datadog | New Relic | Dedicated main diff | Summary |
| --- | --- | --- | --- | --- | --- |
| Dedicated | `<PASS/FAIL/BLOCKED>` | `<PASS/FAIL/BLOCKED>` | `<PASS/FAIL/BLOCKED>` | `<NO_DIFF/DIFF/BLOCKED>` | `<...>` |
| Premium | `<PASS/FAIL/BLOCKED>` | `<PASS/FAIL/BLOCKED>` | `<PASS/FAIL/BLOCKED>` | `N/A` | `<...>` |
| Essential | `<PASS/FAIL/BLOCKED>` | `<PASS/FAIL/BLOCKED>` | `<PASS/FAIL/BLOCKED>` | `N/A` | `<...>` |
| Starter | `<PASS/FAIL/BLOCKED>` | `<PASS/FAIL/BLOCKED>` | `<PASS/FAIL/BLOCKED>` | `N/A` | `<...>` |

### 4.2 Key Conclusions

- `<conclusion 1>`
- `<conclusion 2>`
- `<conclusion 3>`

### 4.3 Failed or Blocked Items

- `<write None if there are none>`

## 5. Dedicated Validation

### 5.1 Dedicated - Prometheus

#### Basic Info

| Field | Content |
| --- | --- |
| Cluster ID | `<cluster-id>` |
| Integration ID | `<integration-id>` |
| Query Endpoint | `<endpoint>` |
| Validation Time | `<timestamp>` |
| Result | `<PASS/FAIL/BLOCKED>` |

#### Validation Steps

1. `<create Prometheus integration>`
2. `<connect Grafana datasource>`
3. `<validate via dashboard or Prometheus query>`

#### Key Checks

| Check | Expected | Actual | Result |
| --- | --- | --- | --- |
| Integration created successfully | usable token / endpoint returned | `<...>` | `<PASS/FAIL>` |
| Metrics queryable | `tidbcloud_` metrics exist | `<...>` | `<PASS/FAIL>` |
| Labels correct | labels match local output | `<...>` | `<PASS/FAIL>` |
| Grafana visible | dashboard contains actual time series | `<...>` | `<PASS/FAIL>` |

#### Sample Metrics

| Metric Name | Visible | Notes |
| --- | --- | --- |
| `tidbcloud_db_query_per_second` | `<yes/no>` | `<...>` |
| `tidbcloud_db_connections` | `<yes/no>` | `<...>` |
| `tidbcloud_node_cpu_seconds_total` | `<yes/no>` | `<...>` |

Repeat the same structure for:

- Dedicated - Datadog
- Dedicated - New Relic
- Premium
- Essential
- Starter

## 6. Attachments

- screenshots
- platform-side dashboards
- query results
- local `test-results/` artifacts
- diff outputs for Dedicated
