Commit 43b786c
feat(bigtable): client side metrics handlers (#16760)
Migrate googleapis/python-bigtable#1189 to the
monorepo
This PR builds off of
googleapis/python-bigtable#1187 to add handlers
to the client-side metrics system, which can subscribe to the metrics
stream, and export the results into different collection systems
We add two handlers to the system:
- `GoogleCloudMetricsHandler`: sends metrics to a private OpenTelemetry
meter, and then periodically exports them to GCP. Built on top of
`OpenTelemetryMetricsHandler`
- `OpenTelemetryMetricsHandler`: sends metrics to the root
MeterProvider, so the user can access the exported metrics for their own
systems. This will be off by default, but can be added alongside
`GoogleCloudMetricsHandler` if needed
---------
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>1 parent b84b754 commit 43b786c
21 files changed
Lines changed: 2036 additions & 111 deletions
File tree
- packages/google-cloud-bigtable
- google/cloud/bigtable/data
- _async
- _metrics
- handlers
- _sync_autogen
- tests
- system/data
- unit/data
- _async
- _metrics
- _sync_autogen
Lines changed: 53 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
64 | 65 | | |
65 | 66 | | |
66 | 67 | | |
| 68 | + | |
67 | 69 | | |
68 | 70 | | |
69 | 71 | | |
70 | 72 | | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
71 | 78 | | |
72 | 79 | | |
73 | 80 | | |
| |||
159 | 166 | | |
160 | 167 | | |
161 | 168 | | |
| 169 | + | |
| 170 | + | |
162 | 171 | | |
163 | 172 | | |
164 | 173 | | |
| |||
262 | 271 | | |
263 | 272 | | |
264 | 273 | | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
265 | 295 | | |
266 | 296 | | |
267 | 297 | | |
| |||
394 | 424 | | |
395 | 425 | | |
396 | 426 | | |
| 427 | + | |
397 | 428 | | |
398 | 429 | | |
399 | 430 | | |
| |||
1109 | 1140 | | |
1110 | 1141 | | |
1111 | 1142 | | |
1112 | | - | |
1113 | | - | |
1114 | 1143 | | |
1115 | 1144 | | |
1116 | 1145 | | |
| |||
1124 | 1153 | | |
1125 | 1154 | | |
1126 | 1155 | | |
| 1156 | + | |
| 1157 | + | |
| 1158 | + | |
| 1159 | + | |
| 1160 | + | |
| 1161 | + | |
| 1162 | + | |
| 1163 | + | |
| 1164 | + | |
| 1165 | + | |
| 1166 | + | |
| 1167 | + | |
| 1168 | + | |
| 1169 | + | |
| 1170 | + | |
1127 | 1171 | | |
1128 | 1172 | | |
1129 | 1173 | | |
| |||
1189 | 1233 | | |
1190 | 1234 | | |
1191 | 1235 | | |
1192 | | - | |
1193 | | - | |
1194 | | - | |
| 1236 | + | |
1195 | 1237 | | |
1196 | 1238 | | |
1197 | 1239 | | |
| |||
1295 | 1337 | | |
1296 | 1338 | | |
1297 | 1339 | | |
1298 | | - | |
1299 | | - | |
1300 | | - | |
| 1340 | + | |
1301 | 1341 | | |
1302 | 1342 | | |
1303 | 1343 | | |
| |||
1512 | 1552 | | |
1513 | 1553 | | |
1514 | 1554 | | |
1515 | | - | |
1516 | | - | |
1517 | | - | |
| 1555 | + | |
1518 | 1556 | | |
1519 | 1557 | | |
1520 | 1558 | | |
| |||
1646 | 1684 | | |
1647 | 1685 | | |
1648 | 1686 | | |
1649 | | - | |
1650 | | - | |
1651 | | - | |
| 1687 | + | |
1652 | 1688 | | |
1653 | 1689 | | |
1654 | 1690 | | |
| |||
1722 | 1758 | | |
1723 | 1759 | | |
1724 | 1760 | | |
1725 | | - | |
| 1761 | + | |
1726 | 1762 | | |
1727 | 1763 | | |
1728 | 1764 | | |
| |||
1781 | 1817 | | |
1782 | 1818 | | |
1783 | 1819 | | |
1784 | | - | |
| 1820 | + | |
1785 | 1821 | | |
1786 | 1822 | | |
1787 | 1823 | | |
| |||
1839 | 1875 | | |
1840 | 1876 | | |
1841 | 1877 | | |
1842 | | - | |
| 1878 | + | |
1843 | 1879 | | |
1844 | 1880 | | |
1845 | 1881 | | |
| |||
1860 | 1896 | | |
1861 | 1897 | | |
1862 | 1898 | | |
1863 | | - | |
1864 | 1899 | | |
1865 | 1900 | | |
1866 | 1901 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
379 | 379 | | |
380 | 380 | | |
381 | 381 | | |
382 | | - | |
| 382 | + | |
383 | 383 | | |
384 | 384 | | |
385 | 385 | | |
| |||
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
22 | 28 | | |
23 | 29 | | |
24 | 30 | | |
25 | 31 | | |
26 | 32 | | |
27 | 33 | | |
28 | 34 | | |
| 35 | + | |
| 36 | + | |
29 | 37 | | |
30 | 38 | | |
31 | 39 | | |
| |||
Lines changed: 12 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
121 | 125 | | |
122 | 126 | | |
123 | 127 | | |
| |||
160 | 164 | | |
161 | 165 | | |
162 | 166 | | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
163 | 171 | | |
164 | 172 | | |
165 | 173 | | |
| |||
375 | 383 | | |
376 | 384 | | |
377 | 385 | | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
378 | 390 | | |
379 | 391 | | |
380 | 392 | | |
| |||
0 commit comments