Skip to content

Commit bd644e6

Browse files
committed
log: add KV_EXEC and CHANGEFEED logging channels
KV_EXEC is intended to contain KV events that don't fall into the KV_DISTRIBUTION channel CHANGEFEED is for changefeed events that are currently being logged to the TELEMETRY channel Part of: CRDB-53411 Epic: CRDB-53410 Release note (ops change): Introduces two new logging channels: KV_EXEC and CHANGEFEED. KV_EXEC will contain kv events that don't fall into the KV_DISTRIBUTION channel and CHANGEFEED will eventually contain changefeed events (This change doesn't add any logic to move existing changefeed logs to this channel).
1 parent 1522360 commit bd644e6

File tree

10 files changed

+650
-23
lines changed

10 files changed

+650
-23
lines changed

docs/generated/logging.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,3 +177,12 @@ The `KV_DISTRIBUTION` channel is used to report data distribution events, such a
177177
replicas between stores in the cluster, or adding (removing) replicas to
178178
ranges.
179179

180+
### `CHANGEFEED`
181+
182+
The `CHANGEFEED` channel is used to report changefeed events
183+
184+
### `KV_EXEC`
185+
186+
The `KV_EXEC` channel is used to report KV execution events that don't fall into the
187+
KV_DISTRIBUTION channel.
188+

pkg/cli/testdata/logflags

Lines changed: 39 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ SQL_EXEC,
2929
SQL_PERF,
3030
SQL_INTERNAL_PERF,
3131
TELEMETRY,
32-
KV_DISTRIBUTION],<defaultLogDir>,true,crdb-v2)>,
32+
KV_DISTRIBUTION,
33+
CHANGEFEED,
34+
KV_EXEC],<defaultLogDir>,true,crdb-v2)>,
3335
health: <fileCfg(INFO: [HEALTH],<defaultLogDir>,true,crdb-v2)>,
3436
kv-distribution: <fileCfg(INFO: [KV_DISTRIBUTION],<defaultLogDir>,true,crdb-v2)>,
3537
pebble: <fileCfg(INFO: [STORAGE],<defaultLogDir>,true,crdb-v2)>,
@@ -66,7 +68,9 @@ SQL_EXEC,
6668
SQL_PERF,
6769
SQL_INTERNAL_PERF,
6870
TELEMETRY,
69-
KV_DISTRIBUTION],<defaultLogDir>,true,crdb-v2)>,
71+
KV_DISTRIBUTION,
72+
CHANGEFEED,
73+
KV_EXEC],<defaultLogDir>,true,crdb-v2)>,
7074
health: <fileCfg(INFO: [HEALTH],<defaultLogDir>,true,crdb-v2)>,
7175
kv-distribution: <fileCfg(INFO: [KV_DISTRIBUTION],<defaultLogDir>,true,crdb-v2)>,
7276
pebble: <fileCfg(INFO: [STORAGE],<defaultLogDir>,true,crdb-v2)>,
@@ -173,7 +177,9 @@ SQL_EXEC,
173177
SQL_PERF,
174178
SQL_INTERNAL_PERF,
175179
TELEMETRY,
176-
KV_DISTRIBUTION],/pathA/logs,true,crdb-v2)>,
180+
KV_DISTRIBUTION,
181+
CHANGEFEED,
182+
KV_EXEC],/pathA/logs,true,crdb-v2)>,
177183
health: <fileCfg(INFO: [HEALTH],/pathA/logs,true,crdb-v2)>,
178184
kv-distribution: <fileCfg(INFO: [KV_DISTRIBUTION],/pathA/logs,true,crdb-v2)>,
179185
pebble: <fileCfg(INFO: [STORAGE],/pathA/logs,true,crdb-v2)>,
@@ -212,7 +218,9 @@ SQL_EXEC,
212218
SQL_PERF,
213219
SQL_INTERNAL_PERF,
214220
TELEMETRY,
215-
KV_DISTRIBUTION],/mypath,true,crdb-v2)>,
221+
KV_DISTRIBUTION,
222+
CHANGEFEED,
223+
KV_EXEC],/mypath,true,crdb-v2)>,
216224
health: <fileCfg(INFO: [HEALTH],/mypath,true,crdb-v2)>,
217225
kv-distribution: <fileCfg(INFO: [KV_DISTRIBUTION],/mypath,true,crdb-v2)>,
218226
pebble: <fileCfg(INFO: [STORAGE],/mypath,true,crdb-v2)>,
@@ -252,7 +260,9 @@ SQL_EXEC,
252260
SQL_PERF,
253261
SQL_INTERNAL_PERF,
254262
TELEMETRY,
255-
KV_DISTRIBUTION],/pathA/logs,true,crdb-v2)>,
263+
KV_DISTRIBUTION,
264+
CHANGEFEED,
265+
KV_EXEC],/pathA/logs,true,crdb-v2)>,
256266
health: <fileCfg(INFO: [HEALTH],/pathA/logs,true,crdb-v2)>,
257267
kv-distribution: <fileCfg(INFO: [KV_DISTRIBUTION],/pathA/logs,true,crdb-v2)>,
258268
pebble: <fileCfg(INFO: [STORAGE],/pathA/logs,true,crdb-v2)>,
@@ -297,7 +307,9 @@ SQL_EXEC,
297307
SQL_PERF,
298308
SQL_INTERNAL_PERF,
299309
TELEMETRY,
300-
KV_DISTRIBUTION],/mypath,true,crdb-v2)>,
310+
KV_DISTRIBUTION,
311+
CHANGEFEED,
312+
KV_EXEC],/mypath,true,crdb-v2)>,
301313
health: <fileCfg(INFO: [HEALTH],/mypath,true,crdb-v2)>,
302314
kv-distribution: <fileCfg(INFO: [KV_DISTRIBUTION],/mypath,true,crdb-v2)>,
303315
pebble: <fileCfg(INFO: [STORAGE],/mypath,true,crdb-v2)>,
@@ -335,7 +347,9 @@ SQL_EXEC,
335347
SQL_PERF,
336348
SQL_INTERNAL_PERF,
337349
TELEMETRY,
338-
KV_DISTRIBUTION],<defaultLogDir>,true,crdb-v2)>,
350+
KV_DISTRIBUTION,
351+
CHANGEFEED,
352+
KV_EXEC],<defaultLogDir>,true,crdb-v2)>,
339353
health: <fileCfg(INFO: [HEALTH],<defaultLogDir>,true,crdb-v2)>,
340354
kv-distribution: <fileCfg(INFO: [KV_DISTRIBUTION],<defaultLogDir>,true,crdb-v2)>,
341355
pebble: <fileCfg(INFO: [STORAGE],<defaultLogDir>,true,crdb-v2)>,
@@ -374,7 +388,9 @@ SQL_EXEC,
374388
SQL_PERF,
375389
SQL_INTERNAL_PERF,
376390
TELEMETRY,
377-
KV_DISTRIBUTION],<defaultLogDir>,true,crdb-v2)>,
391+
KV_DISTRIBUTION,
392+
CHANGEFEED,
393+
KV_EXEC],<defaultLogDir>,true,crdb-v2)>,
378394
health: <fileCfg(INFO: [HEALTH],<defaultLogDir>,true,crdb-v2)>,
379395
kv-distribution: <fileCfg(INFO: [KV_DISTRIBUTION],<defaultLogDir>,true,crdb-v2)>,
380396
pebble: <fileCfg(INFO: [STORAGE],<defaultLogDir>,true,crdb-v2)>,
@@ -423,7 +439,9 @@ SQL_EXEC,
423439
SQL_PERF,
424440
SQL_INTERNAL_PERF,
425441
TELEMETRY,
426-
KV_DISTRIBUTION],<defaultLogDir>,true,crdb-v2)>,
442+
KV_DISTRIBUTION,
443+
CHANGEFEED,
444+
KV_EXEC],<defaultLogDir>,true,crdb-v2)>,
427445
health: <fileCfg(INFO: [HEALTH],<defaultLogDir>,true,crdb-v2)>,
428446
kv-distribution: <fileCfg(INFO: [KV_DISTRIBUTION],<defaultLogDir>,true,crdb-v2)>,
429447
pebble: <fileCfg(INFO: [STORAGE],<defaultLogDir>,true,crdb-v2)>,
@@ -495,7 +513,9 @@ SQL_EXEC,
495513
SQL_PERF,
496514
SQL_INTERNAL_PERF,
497515
TELEMETRY,
498-
KV_DISTRIBUTION],/mypath,true,crdb-v2)>,
516+
KV_DISTRIBUTION,
517+
CHANGEFEED,
518+
KV_EXEC],/mypath,true,crdb-v2)>,
499519
health: <fileCfg(INFO: [HEALTH],/mypath,true,crdb-v2)>,
500520
kv-distribution: <fileCfg(INFO: [KV_DISTRIBUTION],/mypath,true,crdb-v2)>,
501521
pebble: <fileCfg(INFO: [STORAGE],/mypath,true,crdb-v2)>,
@@ -535,7 +555,9 @@ SQL_EXEC,
535555
SQL_PERF,
536556
SQL_INTERNAL_PERF,
537557
TELEMETRY,
538-
KV_DISTRIBUTION],/pathA,true,crdb-v2)>,
558+
KV_DISTRIBUTION,
559+
CHANGEFEED,
560+
KV_EXEC],/pathA,true,crdb-v2)>,
539561
health: <fileCfg(INFO: [HEALTH],/pathA,true,crdb-v2)>,
540562
kv-distribution: <fileCfg(INFO: [KV_DISTRIBUTION],/pathA,true,crdb-v2)>,
541563
pebble: <fileCfg(INFO: [STORAGE],/pathA,true,crdb-v2)>,
@@ -595,7 +617,9 @@ SQL_EXEC,
595617
SQL_PERF,
596618
SQL_INTERNAL_PERF,
597619
TELEMETRY,
598-
KV_DISTRIBUTION],<defaultLogDir>,true,crdb-v2)>,
620+
KV_DISTRIBUTION,
621+
CHANGEFEED,
622+
KV_EXEC],<defaultLogDir>,true,crdb-v2)>,
599623
health: <fileCfg(INFO: [HEALTH],<defaultLogDir>,true,crdb-v2)>,
600624
kv-distribution: <fileCfg(INFO: [KV_DISTRIBUTION],<defaultLogDir>,true,crdb-v2)>,
601625
pebble: <fileCfg(INFO: [STORAGE],<defaultLogDir>,true,crdb-v2)>,
@@ -633,7 +657,9 @@ SQL_EXEC,
633657
SQL_PERF,
634658
SQL_INTERNAL_PERF,
635659
TELEMETRY,
636-
KV_DISTRIBUTION],<defaultLogDir>,true,crdb-v2)>,
660+
KV_DISTRIBUTION,
661+
CHANGEFEED,
662+
KV_EXEC],<defaultLogDir>,true,crdb-v2)>,
637663
health: <fileCfg(INFO: [HEALTH],<defaultLogDir>,true,crdb-v2)>,
638664
kv-distribution: <fileCfg(INFO: [KV_DISTRIBUTION],<defaultLogDir>,true,crdb-v2)>,
639665
pebble: <fileCfg(INFO: [STORAGE],<defaultLogDir>,true,crdb-v2)>,

pkg/util/log/channel/channel_generated.go

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/util/log/eventpb/eventpbgen/log_channels_generated.go

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)