Commit 5cf4e2b
fix(telemetry): report tracesUrl and explain trace disconnects
The agent never populated tracesUrl, and never said why traces were down.
tracesUrl: the legacy sink passed clickhouse_url (CLICKHOUSE_HOST) into
get_trace_url(); the Go port hardcoded that path to "" on the premise that we
no longer run a local ClickHouse. main.go does read and probe CLICKHOUSE_HOST,
so the premise was stale and the field shipped empty for every otel_clickhouse
cluster. That left agent_service.go's `TracesUrl != nil` gate permanently
closed, so the trace-table config was never written and Last9 clusters resolved
`otel_traces` instead of `otel.traces`. Add isClickHouseEnabled as the
otel_clickhouse counterpart of isJaegerEnabled, and report the host.
ClickHouse is checked last in traceURL rather than first as in the legacy: the
legacy order returns the ClickHouse host even when TRACE_TABLE makes the
provider bigquery, and the backend then quotes that host as a BigQuery table.
It is also deliberately not used by traceStatus — gating tracesEnabled on the
URL would turn traces off for TRACES_ENABLED=true-without-host, a config the
agent supports for external ClickHouse it cannot probe.
tracesConnectionError: the field was declared (agent_service.go) and rendered
(agentHealth.jsx renderReason) but emitted by nobody, so a Disconnected Traces
pill never showed a reason. probeClickhouse now returns one alongside the
status; httpProbe is split over a new httpProbeErr so the failure survives,
leaving its other callers untouched. Credentials in a URL-form CLICKHOUSE_HOST
are stripped before the reason ships, since it renders verbatim in the UI.
The field intentionally omits `omitempty`: the collector merges activity_stats
into connection_status with jsonb `||`, so an omitted key leaves the previous
value in place. A recovered ClickHouse must post an explicit "" to clear the
stale reason.
Fixes #34231
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 6d1cadc commit 5cf4e2b
4 files changed
Lines changed: 270 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
992 | 993 | | |
993 | 994 | | |
994 | 995 | | |
995 | | - | |
| 996 | + | |
996 | 997 | | |
997 | 998 | | |
998 | 999 | | |
| |||
1013 | 1014 | | |
1014 | 1015 | | |
1015 | 1016 | | |
| 1017 | + | |
| 1018 | + | |
1016 | 1019 | | |
1017 | 1020 | | |
1018 | 1021 | | |
| |||
1293 | 1296 | | |
1294 | 1297 | | |
1295 | 1298 | | |
1296 | | - | |
| 1299 | + | |
| 1300 | + | |
| 1301 | + | |
| 1302 | + | |
| 1303 | + | |
| 1304 | + | |
1297 | 1305 | | |
1298 | | - | |
| 1306 | + | |
1299 | 1307 | | |
1300 | | - | |
| 1308 | + | |
1301 | 1309 | | |
1302 | 1310 | | |
1303 | | - | |
| 1311 | + | |
| 1312 | + | |
| 1313 | + | |
| 1314 | + | |
| 1315 | + | |
| 1316 | + | |
| 1317 | + | |
| 1318 | + | |
| 1319 | + | |
| 1320 | + | |
| 1321 | + | |
| 1322 | + | |
| 1323 | + | |
| 1324 | + | |
| 1325 | + | |
| 1326 | + | |
| 1327 | + | |
| 1328 | + | |
| 1329 | + | |
| 1330 | + | |
| 1331 | + | |
| 1332 | + | |
| 1333 | + | |
| 1334 | + | |
| 1335 | + | |
| 1336 | + | |
| 1337 | + | |
1304 | 1338 | | |
1305 | | - | |
| 1339 | + | |
| 1340 | + | |
| 1341 | + | |
| 1342 | + | |
1306 | 1343 | | |
1307 | 1344 | | |
1308 | 1345 | | |
| |||
1336 | 1373 | | |
1337 | 1374 | | |
1338 | 1375 | | |
| 1376 | + | |
| 1377 | + | |
| 1378 | + | |
| 1379 | + | |
| 1380 | + | |
| 1381 | + | |
1339 | 1382 | | |
1340 | 1383 | | |
1341 | | - | |
| 1384 | + | |
1342 | 1385 | | |
1343 | 1386 | | |
1344 | 1387 | | |
| |||
1347 | 1390 | | |
1348 | 1391 | | |
1349 | 1392 | | |
1350 | | - | |
| 1393 | + | |
1351 | 1394 | | |
1352 | 1395 | | |
1353 | | - | |
| 1396 | + | |
| 1397 | + | |
| 1398 | + | |
| 1399 | + | |
1354 | 1400 | | |
1355 | 1401 | | |
1356 | 1402 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
| 10 | + | |
9 | 11 | | |
| 12 | + | |
10 | 13 | | |
11 | 14 | | |
12 | 15 | | |
| |||
185 | 188 | | |
186 | 189 | | |
187 | 190 | | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
69 | 78 | | |
70 | 79 | | |
71 | 80 | | |
| |||
142 | 151 | | |
143 | 152 | | |
144 | 153 | | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
145 | 163 | | |
146 | 164 | | |
147 | 165 | | |
| |||
359 | 377 | | |
360 | 378 | | |
361 | 379 | | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
362 | 387 | | |
363 | 388 | | |
364 | 389 | | |
| |||
398 | 423 | | |
399 | 424 | | |
400 | 425 | | |
401 | | - | |
402 | | - | |
403 | | - | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
404 | 432 | | |
405 | 433 | | |
406 | 434 | | |
| |||
417 | 445 | | |
418 | 446 | | |
419 | 447 | | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
420 | 451 | | |
421 | 452 | | |
422 | 453 | | |
| |||
436 | 467 | | |
437 | 468 | | |
438 | 469 | | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
439 | 482 | | |
440 | 483 | | |
441 | 484 | | |
| |||
0 commit comments