# Wetech YK Shared Targets

<!-- auto-oncall-optimization-record
{
  "schemaVersion": "auto-oncall-optimization-record-v1",
  "optimizationId": "wetech-yk-shared-targets-2026-08-13",
  "problems": [
    {
      "problemId": "wetech-yk-stale-grafana-dashboard-targets",
      "summary": "YK and YK-QFXT used stale dedicated Grafana and Dashboard routes instead of the verified shared Asia targets.",
      "status": "optimized_verified",
      "issueKeys": ["APID-29339"],
      "sourceRefs": ["https://tidb.atlassian.net/browse/APID-29339#problem:provider_gap:wetech-yk-stale-targets"],
      "signalTextIncludesAny": ["Grafana session is not ready", "HTTP 502", "op_batch_target_invalid", "Cluster Not Found"],
      "observedThrough": "2026-08-13",
      "effectiveAt": "2026-08-13T16:52:00+08:00",
      "verifiedAt": "2026-08-13T17:08:04+08:00",
      "attemptedAction": "Route YK and YK-QFXT metrics through the verified 7bdo shared Grafana datasource UIDs and route Dashboard queries through their verified shared proxy cluster names; remove the restricted ihr standby from Wallet targets.",
      "evidenceUrl": "https://tidb.atlassian.net/browse/APID-29339?focusedCommentId=23547826"
    }
  ]
}
-->

- Owner: auto-oncall-services Wetech provider inventory
- Source: APID-29339 and live read-only provider verification on 2026-08-13
- Bounded problem: stale or permission-denied Asia Grafana and Dashboard targets
  prevented readiness and SQL evidence acquisition for YK-family cases.
- Implementation status: merged in `tidbcloud/aisupport#877` and deployed to
  staging as image `b57324bb4cc5671bf32b22b47fd9993ec3d182a6`.
- Effective status: optimized and verified.

## Verification evidence

- Pre-change APID-29339 Job 150084 stopped at Wetech readiness before TopSQL or
  Slow Query execution.
- Live checks found both YK datasource UIDs on `7bdo93ukkj` and returned HTTP
  200 Prometheus results.
- Live Statements checks passed for `ali-hk-prod-yk-sql-tidb` and
  `ali-hk-prod-yk-qfxt-tidb` on both shared Dashboard origins.
- Post-deploy APID-29339 replay `7d481e33-4dab-4a5d-b4c4-ef29ee7a0305`
  completed Wetech evidence acquisition with verified provider capability.
  Slow Query and Statements both executed against
  `ali-hk-prod-yk-sql-tidb`; the replay found aligned historical records
  instead of stopping at target readiness.
- Write replay run DB `150028` updated existing Jira comment `23547826` in
  place. Jira readback confirmed `public=false` and the old internal mapping
  failure text was removed.

## Unresolved gaps

- The target SQL/digest and execution plan were not present in the frozen
  customer input. The replay correctly remains `human_required` and asks the
  customer for SQL/digest, `EXPLAIN ANALYZE`, timing, and expected latency.
- One Slow Query Dashboard attempt required an Evidence Agent query repair
  after the initial Dashboard origin timed out; the repaired query succeeded.
  This latency is separate from the fixed stale-target problem.

## Next validation action

Monitor later YK cases for Dashboard authentication latency and treat repeated
timeouts as a separate provider-runtime problem.
