Commit 8ce37eb
authored
feat(agent-config): add logs_enabled master toggle (#138)
* feat(agent-config): add logs_enabled master toggle
Adds the canonical dd-agent.yaml top-level `logs_enabled: bool` field to
the upstream `Config` struct, sourced from `DD_LOGS_ENABLED` (env) and
`logs_enabled` (datadog.yaml). Matches dd-agent's
pkg/config/config_template.yaml documentation and defaults to `false`.
Currently the lambda extension carries this as a source-side alias on
its `LambdaConfigSource` that OR-merges into a separate
`serverless_logs_enabled` field. Pushing `logs_enabled` upstream means
consumers (lambda extension and any future embedder) have a real
resolved config field for the canonical dd-agent toggle, instead of
synthesizing one.
* test(agent-config): give logs_enabled an invalid type in fallback test
Address Copilot review: in the yaml broken-fallback test, every non-string
field is set to an invalid type (e.g. [1, 2, 3]) to exercise graceful
fallback to defaults. logs_enabled was inadvertently set to a valid
boolean (true), which defeated the test's intent for this new field.
Set it to [1, 2, 3] and assert the resolved value stays at the default
(false). Now the test fails if graceful-fallback handling for
logs_enabled ever regresses.1 parent f76e911 commit 8ce37eb
3 files changed
Lines changed: 55 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
77 | 82 | | |
78 | 83 | | |
79 | 84 | | |
| |||
189 | 194 | | |
190 | 195 | | |
191 | 196 | | |
| 197 | + | |
192 | 198 | | |
193 | 199 | | |
194 | 200 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
137 | 142 | | |
138 | 143 | | |
139 | 144 | | |
| |||
403 | 408 | | |
404 | 409 | | |
405 | 410 | | |
| 411 | + | |
406 | 412 | | |
407 | 413 | | |
408 | 414 | | |
| |||
628 | 634 | | |
629 | 635 | | |
630 | 636 | | |
| 637 | + | |
631 | 638 | | |
632 | 639 | | |
633 | 640 | | |
| |||
846 | 853 | | |
847 | 854 | | |
848 | 855 | | |
| 856 | + | |
849 | 857 | | |
850 | 858 | | |
851 | 859 | | |
| |||
991 | 999 | | |
992 | 1000 | | |
993 | 1001 | | |
| 1002 | + | |
994 | 1003 | | |
995 | 1004 | | |
996 | 1005 | | |
| |||
1122 | 1131 | | |
1123 | 1132 | | |
1124 | 1133 | | |
| 1134 | + | |
| 1135 | + | |
| 1136 | + | |
| 1137 | + | |
| 1138 | + | |
| 1139 | + | |
| 1140 | + | |
| 1141 | + | |
| 1142 | + | |
| 1143 | + | |
| 1144 | + | |
| 1145 | + | |
| 1146 | + | |
| 1147 | + | |
| 1148 | + | |
| 1149 | + | |
| 1150 | + | |
| 1151 | + | |
| 1152 | + | |
| 1153 | + | |
| 1154 | + | |
| 1155 | + | |
| 1156 | + | |
| 1157 | + | |
| 1158 | + | |
| 1159 | + | |
| 1160 | + | |
| 1161 | + | |
| 1162 | + | |
| 1163 | + | |
| 1164 | + | |
1125 | 1165 | | |
1126 | 1166 | | |
1127 | 1167 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
75 | 79 | | |
76 | 80 | | |
77 | 81 | | |
| |||
438 | 442 | | |
439 | 443 | | |
440 | 444 | | |
| 445 | + | |
441 | 446 | | |
442 | 447 | | |
443 | 448 | | |
| |||
777 | 782 | | |
778 | 783 | | |
779 | 784 | | |
| 785 | + | |
780 | 786 | | |
781 | 787 | | |
782 | 788 | | |
| |||
867 | 873 | | |
868 | 874 | | |
869 | 875 | | |
| 876 | + | |
870 | 877 | | |
871 | 878 | | |
872 | 879 | | |
| |||
934 | 941 | | |
935 | 942 | | |
936 | 943 | | |
| 944 | + | |
937 | 945 | | |
938 | 946 | | |
939 | 947 | | |
| |||
1060 | 1068 | | |
1061 | 1069 | | |
1062 | 1070 | | |
| 1071 | + | |
1063 | 1072 | | |
1064 | 1073 | | |
1065 | 1074 | | |
| |||
0 commit comments