Skip to content

Commit 9b2db4c

Browse files
craig[bot]andyyang890
andcommitted
Merge #153381
153381: cli: add changefeed file group to default logging configuration r=dhartunian a=andyyang890 Fixes #153382 Release note (ops change): A new `changefeed` file group that collects changefeed logs has been added to the default logging configuration. Co-authored-by: Andy Yang <[email protected]>
2 parents 0e5c8ad + e11bf4b commit 9b2db4c

File tree

3 files changed

+34
-16
lines changed

3 files changed

+34
-16
lines changed

pkg/cli/log_flags.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -463,14 +463,15 @@ func addPredefinedLogFiles(c *logconfig.Config) {
463463
const predefinedLogFiles = `
464464
sinks:
465465
file-groups:
466-
kv-distribution: { channels: KV_DISTRIBUTION }
467466
default:
468467
channels:
469468
INFO: [DEV, OPS]
470469
WARNING: all except [DEV, OPS]
471-
health: { channels: HEALTH }
470+
changefeed: { channels: CHANGEFEED }
471+
health: { channels: HEALTH }
472+
kv-distribution: { channels: KV_DISTRIBUTION }
472473
pebble: { channels: STORAGE }
473-
security: { channels: [PRIVILEGES, USER_ADMIN], auditable: true }
474+
security: { channels: [PRIVILEGES, USER_ADMIN], auditable: true }
474475
sql-auth: { channels: SESSIONS, auditable: true }
475476
sql-audit: { channels: SENSITIVE_ACCESS, auditable: true }
476477
sql-exec: { channels: SQL_EXEC }

pkg/cli/testdata/logflags

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ config: {<stdFileDefaults(<defaultLogDir>)>,
1616
<fluentDefaults>,
1717
<httpDefaults>,
1818
<otlpDefaults>,
19-
sinks: {file-groups: {default: <fileCfg(INFO: [DEV,
19+
sinks: {file-groups: {changefeed: <fileCfg(INFO: [CHANGEFEED],<defaultLogDir>,true,crdb-v2)>,
20+
default: <fileCfg(INFO: [DEV,
2021
OPS],
2122
WARNING: [HEALTH,
2223
STORAGE,
@@ -55,7 +56,8 @@ config: {<stdFileDefaults(<defaultLogDir>)>,
5556
<fluentDefaults>,
5657
<httpDefaults>,
5758
<otlpDefaults>,
58-
sinks: {file-groups: {default: <fileCfg(INFO: [DEV,
59+
sinks: {file-groups: {changefeed: <fileCfg(INFO: [CHANGEFEED],<defaultLogDir>,true,crdb-v2)>,
60+
default: <fileCfg(INFO: [DEV,
5961
OPS],
6062
WARNING: [HEALTH,
6163
STORAGE,
@@ -164,7 +166,8 @@ config: {<stdFileDefaults(/pathA/logs)>,
164166
<fluentDefaults>,
165167
<httpDefaults>,
166168
<otlpDefaults>,
167-
sinks: {file-groups: {default: <fileCfg(INFO: [DEV,
169+
sinks: {file-groups: {changefeed: <fileCfg(INFO: [CHANGEFEED],/pathA/logs,true,crdb-v2)>,
170+
default: <fileCfg(INFO: [DEV,
168171
OPS],
169172
WARNING: [HEALTH,
170173
STORAGE,
@@ -205,7 +208,8 @@ config: {<stdFileDefaults(/mypath)>,
205208
<fluentDefaults>,
206209
<httpDefaults>,
207210
<otlpDefaults>,
208-
sinks: {file-groups: {default: <fileCfg(INFO: [DEV,
211+
sinks: {file-groups: {changefeed: <fileCfg(INFO: [CHANGEFEED],/mypath,true,crdb-v2)>,
212+
default: <fileCfg(INFO: [DEV,
209213
OPS],
210214
WARNING: [HEALTH,
211215
STORAGE,
@@ -247,7 +251,8 @@ config: {<stdFileDefaults(/pathA/logs)>,
247251
<fluentDefaults>,
248252
<httpDefaults>,
249253
<otlpDefaults>,
250-
sinks: {file-groups: {default: <fileCfg(INFO: [DEV,
254+
sinks: {file-groups: {changefeed: <fileCfg(INFO: [CHANGEFEED],/pathA/logs,true,crdb-v2)>,
255+
default: <fileCfg(INFO: [DEV,
251256
OPS],
252257
WARNING: [HEALTH,
253258
STORAGE,
@@ -294,7 +299,8 @@ config: {<stdFileDefaults(/mypath)>,
294299
<fluentDefaults>,
295300
<httpDefaults>,
296301
<otlpDefaults>,
297-
sinks: {file-groups: {default: <fileCfg(INFO: [DEV,
302+
sinks: {file-groups: {changefeed: <fileCfg(INFO: [CHANGEFEED],/mypath,true,crdb-v2)>,
303+
default: <fileCfg(INFO: [DEV,
298304
OPS],
299305
WARNING: [HEALTH,
300306
STORAGE,
@@ -334,7 +340,8 @@ config: {<stdFileDefaults(<defaultLogDir>)>,
334340
<fluentDefaults>,
335341
<httpDefaults>,
336342
<otlpDefaults>,
337-
sinks: {file-groups: {default: <fileCfg(INFO: [DEV,
343+
sinks: {file-groups: {changefeed: <fileCfg(INFO: [CHANGEFEED],<defaultLogDir>,true,crdb-v2)>,
344+
default: <fileCfg(INFO: [DEV,
338345
OPS],
339346
WARNING: [HEALTH,
340347
STORAGE,
@@ -375,7 +382,8 @@ config: {<stdFileDefaults(<defaultLogDir>)>,
375382
<fluentDefaults>,
376383
<httpDefaults>,
377384
<otlpDefaults>,
378-
sinks: {file-groups: {default: <fileCfg(INFO: [DEV,
385+
sinks: {file-groups: {changefeed: <fileCfg(INFO: [CHANGEFEED],<defaultLogDir>,true,crdb-v2)>,
386+
default: <fileCfg(INFO: [DEV,
379387
OPS],
380388
WARNING: [HEALTH,
381389
STORAGE,
@@ -426,7 +434,8 @@ config: {<stdFileDefaults(<defaultLogDir>)>,
426434
<fluentDefaults>,
427435
<httpDefaults>,
428436
<otlpDefaults>,
429-
sinks: {file-groups: {default: <fileCfg(INFO: [DEV,
437+
sinks: {file-groups: {changefeed: <fileCfg(INFO: [CHANGEFEED],<defaultLogDir>,true,crdb-v2)>,
438+
default: <fileCfg(INFO: [DEV,
430439
OPS],
431440
WARNING: [HEALTH,
432441
STORAGE,
@@ -500,7 +509,8 @@ config: {<stdFileDefaults(/mypath)>,
500509
<fluentDefaults>,
501510
<httpDefaults>,
502511
<otlpDefaults>,
503-
sinks: {file-groups: {default: <fileCfg(INFO: [DEV,
512+
sinks: {file-groups: {changefeed: <fileCfg(INFO: [CHANGEFEED],/mypath,true,crdb-v2)>,
513+
default: <fileCfg(INFO: [DEV,
504514
OPS],
505515
WARNING: [HEALTH,
506516
STORAGE,
@@ -542,7 +552,8 @@ config: {<stdFileDefaults(/pathA)>,
542552
<fluentDefaults>,
543553
<httpDefaults>,
544554
<otlpDefaults>,
545-
sinks: {file-groups: {default: <fileCfg(INFO: [DEV,
555+
sinks: {file-groups: {changefeed: <fileCfg(INFO: [CHANGEFEED],/pathA,true,crdb-v2)>,
556+
default: <fileCfg(INFO: [DEV,
546557
OPS],
547558
WARNING: [HEALTH,
548559
STORAGE,
@@ -604,7 +615,8 @@ config: {<stdFileDefaults(<defaultLogDir>)>,
604615
<fluentDefaults>,
605616
<httpDefaults>,
606617
<otlpDefaults>,
607-
sinks: {file-groups: {default: <fileCfg(INFO: [DEV,
618+
sinks: {file-groups: {changefeed: <fileCfg(INFO: [CHANGEFEED],<defaultLogDir>,true,crdb-v2)>,
619+
default: <fileCfg(INFO: [DEV,
608620
OPS],
609621
WARNING: [HEALTH,
610622
STORAGE,
@@ -644,7 +656,8 @@ config: {<stdFileDefaults(<defaultLogDir>)>,
644656
<fluentDefaults>,
645657
<httpDefaults>,
646658
<otlpDefaults>,
647-
sinks: {file-groups: {default: <fileCfg(INFO: [DEV,
659+
sinks: {file-groups: {changefeed: <fileCfg(INFO: [CHANGEFEED],<defaultLogDir>,true,crdb-v2)>,
660+
default: <fileCfg(INFO: [DEV,
648661
OPS],
649662
WARNING: [HEALTH,
650663
STORAGE,

pkg/roachprod/install/files/cockroachdb-logging.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ sinks:
3131
channels:
3232
INFO: [DEV, OPS]
3333
WARNING: all except [DEV, OPS]
34+
changefeed:
35+
channels: [CHANGEFEED]
3436
health:
3537
channels: [HEALTH]
3638
kv-distribution:
@@ -48,6 +50,8 @@ sinks:
4850
auditable: false
4951
sql-exec:
5052
channels: [SQL_EXEC]
53+
sql-schema:
54+
channels: [SQL_SCHEMA]
5155
sql-slow:
5256
channels: [SQL_PERF]
5357
sql-slow-internal-only:

0 commit comments

Comments
 (0)