@@ -279,7 +279,9 @@ For an example network logging configuration, see [Logging use cases]({% link {{
279
279
280
280
### Output to OTLP-compatible network collectors
281
281
282
- CockroachDB can send logs to an [OpenTelemetry](https://opentelemetry.io/)-compatible server using the OTLP protocol. Define `otlp-servers` to select channels and configure connection and protocol details. For example:
282
+ CockroachDB can send logs to an [OpenTelemetry](https://opentelemetry.io/)-compatible server using the OTLP protocol (e.g., [Datadog agent](https://docs.datadoghq.com/agent/?tab=Host-based)). For a complete list of log servers that support the OTLP protocol, see the [OpenTelemetry registry](https://opentelemetry.io/ecosystem/vendors/).
283
+
284
+ Define `otlp-servers` to select channels and configure connection and protocol details. For example:
283
285
284
286
~~~ yaml
285
287
file-defaults: ...
@@ -754,73 +756,242 @@ The YAML payload below represents the default logging behavior of [`cockroach st
754
756
755
757
~~~ yaml
756
758
file-defaults:
759
+ dir: /cockroach-data/logs
757
760
max-file-size: 10MiB
758
761
max-group-size: 100MiB
759
- file-permissions: 644
762
+ file-permissions: "0640"
760
763
buffered-writes: true
761
764
filter: INFO
762
765
format: crdb-v2
763
766
redact: false
764
767
redactable: true
765
768
exit-on-error: true
766
769
auditable: false
770
+ buffering: NONE
767
771
fluent-defaults:
768
772
filter: INFO
769
773
format: json-fluent-compact
770
774
redact: false
771
775
redactable: true
772
776
exit-on-error: false
773
777
auditable: false
778
+ buffering:
779
+ max-staleness: 5s
780
+ flush-trigger-size: 1.0MiB
781
+ max-buffer-size: 50MiB
782
+ format: newline
774
783
http-defaults:
775
784
method: POST
776
785
unsafe-tls: false
777
- timeout: 0s
786
+ timeout: 2s
778
787
disable-keep-alives: false
788
+ compression: gzip
779
789
filter: INFO
780
790
format: json-compact
781
791
redact: false
782
792
redactable: true
783
793
exit-on-error: false
784
794
auditable: false
795
+ buffering:
796
+ max-staleness: 5s
797
+ flush-trigger-size: 1.0MiB
798
+ max-buffer-size: 50MiB
799
+ format: newline
800
+ otlp-defaults:
801
+ mode: grpc
802
+ compression: gzip
803
+ filter: INFO
804
+ format: json
805
+ redact: false
806
+ redactable: true
807
+ exit-on-error: false
808
+ auditable: false
809
+ buffering:
810
+ max-staleness: 5s
811
+ flush-trigger-size: 1.0MiB
812
+ max-buffer-size: 50MiB
813
+ format: newline
785
814
sinks:
786
815
file-groups:
816
+ changefeed:
817
+ channels: {INFO: [CHANGEFEED]}
818
+ dir: /cockroach-data/logs
819
+ max-file-size: 10MiB
820
+ max-group-size: 100MiB
821
+ file-permissions: "0640"
822
+ buffered-writes: true
823
+ filter: INFO
824
+ format: crdb-v2
825
+ redact: false
826
+ redactable: true
827
+ exit-on-error: true
828
+ buffering: NONE
787
829
default:
788
- channels:
789
- INFO: [DEV, OPS]
790
- WARNING: all except [DEV, OPS]
830
+ channels: {INFO: [DEV, OPS], WARNING: [HEALTH, STORAGE, SESSIONS, SQL_SCHEMA, USER_ADMIN, PRIVILEGES, SENSITIVE_ACCESS, SQL_EXEC, SQL_PERF, SQL_INTERNAL_PERF, TELEMETRY, KV_DISTRIBUTION, CHANGEFEED, KV_EXEC]}
831
+ dir: /cockroach-data/logs
832
+ max-file-size: 10MiB
833
+ max-group-size: 100MiB
834
+ file-permissions: "0640"
835
+ buffered-writes: true
836
+ filter: INFO
837
+ format: crdb-v2
838
+ redact: false
839
+ redactable: true
840
+ exit-on-error: true
841
+ buffering: NONE
791
842
health:
792
- channels: [HEALTH]
843
+ channels: {INFO: [HEALTH]}
844
+ dir: /cockroach-data/logs
845
+ max-file-size: 10MiB
846
+ max-group-size: 100MiB
847
+ file-permissions: "0640"
848
+ buffered-writes: true
849
+ filter: INFO
850
+ format: crdb-v2
851
+ redact: false
852
+ redactable: true
853
+ exit-on-error: true
854
+ buffering: NONE
793
855
kv-distribution:
794
- channels: [KV_DISTRIBUTION]
856
+ channels: {INFO: [KV_DISTRIBUTION]}
857
+ dir: /cockroach-data/logs
858
+ max-file-size: 10MiB
859
+ max-group-size: 100MiB
860
+ file-permissions: "0640"
861
+ buffered-writes: true
862
+ filter: INFO
863
+ format: crdb-v2
864
+ redact: false
865
+ redactable: true
866
+ exit-on-error: true
867
+ buffering: NONE
795
868
pebble:
796
- channels: [STORAGE]
869
+ channels: {INFO: [STORAGE]}
870
+ dir: /cockroach-data/logs
871
+ max-file-size: 10MiB
872
+ max-group-size: 100MiB
873
+ file-permissions: "0640"
874
+ buffered-writes: true
875
+ filter: INFO
876
+ format: crdb-v2
877
+ redact: false
878
+ redactable: true
879
+ exit-on-error: true
880
+ buffering: NONE
797
881
security:
798
- channels: [PRIVILEGES, USER_ADMIN]
799
- auditable: true
882
+ channels: {INFO: [USER_ADMIN, PRIVILEGES]}
883
+ dir: /cockroach-data/logs
884
+ max-file-size: 10MiB
885
+ max-group-size: 100MiB
886
+ file-permissions: "0640"
887
+ buffered-writes: false
888
+ filter: INFO
889
+ format: crdb-v2
890
+ redact: false
891
+ redactable: true
892
+ exit-on-error: true
893
+ buffering: NONE
800
894
sql-audit:
801
- channels: [SENSITIVE_ACCESS]
802
- auditable: true
895
+ channels: {INFO: [SENSITIVE_ACCESS]}
896
+ dir: /cockroach-data/logs
897
+ max-file-size: 10MiB
898
+ max-group-size: 100MiB
899
+ file-permissions: "0640"
900
+ buffered-writes: false
901
+ filter: INFO
902
+ format: crdb-v2
903
+ redact: false
904
+ redactable: true
905
+ exit-on-error: true
906
+ buffering: NONE
803
907
sql-auth:
804
- channels: [SESSIONS]
805
- auditable: true
908
+ channels: {INFO: [SESSIONS]}
909
+ dir: /cockroach-data/logs
910
+ max-file-size: 10MiB
911
+ max-group-size: 100MiB
912
+ file-permissions: "0640"
913
+ buffered-writes: false
914
+ filter: INFO
915
+ format: crdb-v2
916
+ redact: false
917
+ redactable: true
918
+ exit-on-error: true
919
+ buffering: NONE
806
920
sql-exec:
807
- channels: [SQL_EXEC]
921
+ channels: {INFO: [SQL_EXEC]}
922
+ dir: /cockroach-data/logs
923
+ max-file-size: 10MiB
924
+ max-group-size: 100MiB
925
+ file-permissions: "0640"
926
+ buffered-writes: true
927
+ filter: INFO
928
+ format: crdb-v2
929
+ redact: false
930
+ redactable: true
931
+ exit-on-error: true
932
+ buffering: NONE
933
+ sql-schema:
934
+ channels: {INFO: [SQL_SCHEMA]}
935
+ dir: /cockroach-data/logs
936
+ max-file-size: 10MiB
937
+ max-group-size: 100MiB
938
+ file-permissions: "0640"
939
+ buffered-writes: true
940
+ filter: INFO
941
+ format: crdb-v2
942
+ redact: false
943
+ redactable: true
944
+ exit-on-error: true
945
+ buffering: NONE
808
946
sql-slow:
809
- channels: [SQL_PERF]
947
+ channels: {INFO: [SQL_PERF]}
948
+ dir: /cockroach-data/logs
949
+ max-file-size: 10MiB
950
+ max-group-size: 100MiB
951
+ file-permissions: "0640"
952
+ buffered-writes: true
953
+ filter: INFO
954
+ format: crdb-v2
955
+ redact: false
956
+ redactable: true
957
+ exit-on-error: true
958
+ buffering: NONE
810
959
sql-slow-internal-only:
811
- channels: [SQL_INTERNAL_PERF]
960
+ channels: {INFO: [SQL_INTERNAL_PERF]}
961
+ dir: /cockroach-data/logs
962
+ max-file-size: 10MiB
963
+ max-group-size: 100MiB
964
+ file-permissions: "0640"
965
+ buffered-writes: true
966
+ filter: INFO
967
+ format: crdb-v2
968
+ redact: false
969
+ redactable: true
970
+ exit-on-error: true
971
+ buffering: NONE
812
972
telemetry:
813
- channels: [TELEMETRY]
973
+ channels: {INFO: [TELEMETRY]}
974
+ dir: /cockroach-data/logs
814
975
max-file-size: 100KiB
815
976
max-group-size: 1.0MiB
977
+ file-permissions: "0640"
978
+ buffered-writes: true
979
+ filter: INFO
980
+ format: crdb-v2
981
+ redact: false
982
+ redactable: true
983
+ exit-on-error: true
984
+ buffering: NONE
816
985
stderr:
817
- channels: all
818
986
filter: NONE
987
+ format: crdb-v2-tty
819
988
redact: false
820
989
redactable: true
821
990
exit-on-error: true
991
+ buffering: NONE
822
992
capture-stray-errors:
823
993
enable: true
994
+ dir: /cockroach-data/logs
824
995
max-group-size: 100MiB
825
996
~~~
826
997
0 commit comments