1. Dashboard Rule#

Folder: Database
Dashboard: DynamoDB - Overview

Rows:
    Overview:
        throttle、latency、errors、capacity pressure

    Drilldown:
        按 table / operation / GSI / throttling reason 拆开看

    Capacity:
        consumed capacity、provisioned / on-demand usage、account quota、hot partition signal

    Debug:
        conditional check、TTL、stream、global table、backfill 细节,不放第一屏;排查表行为异常时查看

2. Overview#

Panel Metrics Why
Throttled requests ThrottledRequests DynamoDB 最重要的容量不足信号
Read / write throttle ReadThrottleEvents, WriteThrottleEvents 区分读写压力
Latency SuccessfulRequestLatency p95 by operation 用户侧慢请求信号
System errors SystemErrors AWS service-side failure signal
User errors UserErrors request / schema / condition 相关错误
Capacity usage ConsumedReadCapacityUnits, ConsumedWriteCapacityUnits 看 workload 是否接近 capacity

3. Drilldown#

Panel Metrics Why
Metrics by operation GetItem, Query, PutItem, UpdateItem, DeleteItem dimensions 找到慢或被 throttle 的 API
Table vs GSI table and GlobalSecondaryIndexName dimensions 区分主表还是 GSI 压力
Throttling reason ThrottledRequests with dimensions / reason when available 诊断 key range、account limit、provisioned capacity
Returned data ReturnedItemCount, ReturnedBytes Query 返回过多会放大 RCU 和 latency
Conditional failures ConditionalCheckFailedRequests 乐观锁 / 幂等冲突是否异常

4. Capacity#

Panel Metrics Why
Read capacity trend ConsumedReadCapacityUnits, ProvisionedReadCapacityUnits provisioned mode 容量规划
Write capacity trend ConsumedWriteCapacityUnits, ProvisionedWriteCapacityUnits provisioned mode 容量规划
On-demand pressure on-demand max / account limit throttle metrics if configured on-demand 也可能遇到 table / account limit
Hot key signal key range throttling metrics / Contributor Insights if enabled 识别 partition key 设计问题
GSI capacity consumed / provisioned capacity by GSI GSI 容量不足会影响写入或查询

5. Debug#

Panel Metrics Why
TTL deletes TimeToLiveDeletedItemCount TTL 行为验证
Stream records stream metrics if enabled 只有启用 stream 才展示
Global table replication replication latency / pending replication metrics if used 只有 global table 需要
Backfill GSI backfill metrics if creating GSI 只在 GSI backfill 期间需要
Transaction conflict transaction conflict / cancellation app metrics 需要 SDK / app metric 补足

6. YACE Metrics#

如果 DynamoDB dashboard 使用 aws_dynamodb_* metrics,需要 YACE 采集 AWS/DynamoDB。GSI 指标会带 table / global_secondary_index 相关 label,具体 label 名称以实际 exporter 输出为准。

ThrottledRequests / ReadThrottleEvents / WriteThrottleEvents 都是 AWS 官方 DynamoDB CloudWatch metrics。 如果 CloudWatch 或 YACE 里暂时找不到 ThrottledRequests,通常是因为当前 region/account/table 最近没有 throttle datapoint,或者 YACE discovery 没有发现对应 table,不代表 metric 名称不存在。

YACE config:

apiVersion: v1alpha1
sts-region: ap-northeast-1
discovery:
  jobs:
    - type: AWS/DynamoDB
      regions:
        - ap-northeast-1
      customTags:
        - key: environment
          value: uat
      period: 300
      length: 600
      nilToZero: true
      metrics:
        - name: ThrottledRequests
          statistics: [Sum]
        - name: ReadThrottleEvents
          statistics: [Sum]
        - name: WriteThrottleEvents
          statistics: [Sum]
        - name: SuccessfulRequestLatency
          statistics: [Average, p95, p99]
        - name: SystemErrors
          statistics: [Sum]
        - name: UserErrors
          statistics: [Sum]
        - name: ConsumedReadCapacityUnits
          statistics: [Sum]
        - name: ConsumedWriteCapacityUnits
          statistics: [Sum]
        - name: ProvisionedReadCapacityUnits
          statistics: [Average]
        - name: ProvisionedWriteCapacityUnits
          statistics: [Average]
        - name: ReturnedItemCount
          statistics: [Sum]
        - name: ReturnedBytes
          statistics: [Sum]
        - name: ConditionalCheckFailedRequests
          statistics: [Sum]
        - name: TimeToLiveDeletedItemCount
          statistics: [Sum]

确认 metric name:

{__name__=~"aws_dynamodb_.*"}

7. Do Not Put In Overview#

不要放:
    TTL / stream / global table / backfill 低频指标
    每个 API 的所有成功请求数
    每个 GSI 的全量细节

原因:
    DynamoDB overview 重点是 throttle、latency、errors、capacity