)]}'
{
  "commit": "b54b4f022fbda8910349ce26127c364bc16f9d2c",
  "tree": "34d5a756b7490b93a580bf2a6e777751b6c0988f",
  "parents": [
    "a47a58dd6c7feddd6078e3f768deb46d733bc375"
  ],
  "author": {
    "name": "rahul2393",
    "email": "irahul@google.com",
    "time": "Fri Jun 05 12:51:46 2026 +0530"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Fri Jun 05 12:51:46 2026 +0530"
  },
  "message": "feat(spanner): add OpenTelemetry metrics for dynamic channel pool (#14613)\n\nSplit of https://github.com/googleapis/google-cloud-go/pull/14604\n\nInternal reference: go/go-dcp-design\n\n ## Add OpenTelemetry metrics for the dynamic channel pool\n\n  ### What\nAdds OpenTelemetry metric support for the dynamic channel pool (DCP),\ngiving visibility into pool size, scaling activity, and RPC load.\n\n  ### Metrics (prefix `spanner/dynamic_channel_pool/`)\n  | Metric | Type | Description |\n  | --- | --- | --- |\n  | `num_channels` | gauge | Active channels in the pool |\n  | `draining_channel_count` | gauge | Channels currently draining |\n  | `max_allowed_channels` | gauge | Max channels allowed |\n  | `active_rpc_count` | gauge | Active RPCs on the pool |\n| `max_active_rpc_per_channel ` | gauge | Maximum number of RPCs\ncurrently active on any channel in the dynamic channel pool.|\n| `channel_pool_scaling` | counter | Channels added/removed, tagged\n`direction\u003dup\\|down` |\n\nAll metrics carry the common attributes `client_id`, `database`,\n`instance_id`, `library_version`.\n\n  ### Enablement\nConsistent with existing client metrics: emitted only when\n`EnableOpenTelemetryMetrics()` is set. Uses\n`ClientConfig.OpenTelemetryMeterProvider`, falling back to the global\nOpenTelemetry MeterProvider when unset. The observable callback is\nunregistered on `dynamicChannelPool.Close()`.",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "b9e0833922d85e0243d5e1509e7bc4cffaa574a7",
      "old_mode": 33188,
      "old_path": "spanner/client.go",
      "new_id": "cc2ec01bc9e2622662f75f47c24b73fda4c2e3e8",
      "new_mode": 33188,
      "new_path": "spanner/client.go"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "8cbc3bd02a5a3647c87b9a630fa9f8cd8b4925b6",
      "new_mode": 33188,
      "new_path": "spanner/dcp_metrics.go"
    },
    {
      "type": "modify",
      "old_id": "6b1e23b9e30375f9cedaf306d622cbcb72eafda8",
      "old_mode": 33188,
      "old_path": "spanner/dynamic_channel_pool.go",
      "new_id": "27cc89742abc0e68c6b9b90b4ddcfb2df3b0b034",
      "new_mode": 33188,
      "new_path": "spanner/dynamic_channel_pool.go"
    },
    {
      "type": "modify",
      "old_id": "80b0716e4ca653e6f21a7a478affae67e661a7f3",
      "old_mode": 33188,
      "old_path": "spanner/dynamic_channel_pool_test.go",
      "new_id": "46f86a20e933c26449ebf22bdc7b6695ca58f474",
      "new_mode": 33188,
      "new_path": "spanner/dynamic_channel_pool_test.go"
    }
  ]
}
