Skip to content

Commit a345bd0

Browse files
committed
fix(config-inversion): lowercase type fields in supported-configurations
1 parent b577e17 commit a345bd0

2 files changed

Lines changed: 48 additions & 42 deletions

File tree

supported-configurations.json

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -4,287 +4,287 @@
44
{
55
"default": "localhost",
66
"implementation": "A",
7-
"type": "STRING"
7+
"type": "string"
88
}
99
],
1010
"DD_APM_TRACING_ENABLED": [
1111
{
1212
"default": "1",
1313
"implementation": "A",
14-
"type": "BOOLEAN"
14+
"type": "boolean"
1515
}
1616
],
1717
"DD_ENV": [
1818
{
1919
"default": "",
2020
"implementation": "A",
21-
"type": "STRING"
21+
"type": "string"
2222
}
2323
],
2424
"DD_EXTERNAL_ENV": [
2525
{
2626
"default": "",
2727
"implementation": "A",
28-
"type": "STRING"
28+
"type": "string"
2929
}
3030
],
3131
"DD_INSTRUMENTATION_INSTALL_ID": [
3232
{
3333
"default": "",
3434
"implementation": "A",
35-
"type": "STRING"
35+
"type": "string"
3636
}
3737
],
3838
"DD_INSTRUMENTATION_INSTALL_TIME": [
3939
{
4040
"default": "",
4141
"implementation": "A",
42-
"type": "STRING"
42+
"type": "string"
4343
}
4444
],
4545
"DD_INSTRUMENTATION_INSTALL_TYPE": [
4646
{
4747
"default": "",
4848
"implementation": "A",
49-
"type": "STRING"
49+
"type": "string"
5050
}
5151
],
5252
"DD_INSTRUMENTATION_TELEMETRY_ENABLED": [
5353
{
5454
"default": "1",
5555
"implementation": "A",
56-
"type": "BOOLEAN"
56+
"type": "boolean"
5757
}
5858
],
5959
"DD_PROPAGATION_STYLE_EXTRACT": [
6060
{
6161
"default": "datadog,tracecontext,baggage",
6262
"implementation": "A",
63-
"type": "ARRAY"
63+
"type": "array"
6464
}
6565
],
6666
"DD_PROPAGATION_STYLE_INJECT": [
6767
{
6868
"default": "datadog,tracecontext,baggage",
6969
"implementation": "A",
70-
"type": "ARRAY"
70+
"type": "array"
7171
}
7272
],
7373
"DD_REMOTE_CONFIGURATION_ENABLED": [
7474
{
7575
"default": "1",
7676
"implementation": "A",
77-
"type": "BOOLEAN"
77+
"type": "boolean"
7878
}
7979
],
8080
"DD_REMOTE_CONFIG_POLL_INTERVAL_SECONDS": [
8181
{
8282
"default": "5",
8383
"implementation": "A",
84-
"type": "DECIMAL"
84+
"type": "decimal"
8585
}
8686
],
8787
"DD_SERVICE": [
8888
{
8989
"default": "",
9090
"implementation": "A",
91-
"type": "STRING"
91+
"type": "string"
9292
}
9393
],
9494
"DD_SPAN_SAMPLING_RULES": [
9595
{
9696
"default": "[]",
9797
"implementation": "A",
98-
"type": "ARRAY"
98+
"type": "array"
9999
}
100100
],
101101
"DD_SPAN_SAMPLING_RULES_FILE": [
102102
{
103103
"default": "",
104104
"implementation": "A",
105-
"type": "STRING"
105+
"type": "string"
106106
}
107107
],
108108
"DD_TAGS": [
109109
{
110110
"default": "",
111111
"implementation": "A",
112-
"type": "MAP"
112+
"type": "map"
113113
}
114114
],
115115
"DD_TELEMETRY_DEBUG": [
116116
{
117117
"default": "0",
118118
"implementation": "A",
119-
"type": "BOOLEAN"
119+
"type": "boolean"
120120
}
121121
],
122122
"DD_TELEMETRY_EXTENDED_HEARTBEAT_INTERVAL": [
123123
{
124124
"default": "86400",
125125
"implementation": "A",
126-
"type": "DECIMAL"
126+
"type": "decimal"
127127
}
128128
],
129129
"DD_TELEMETRY_HEARTBEAT_INTERVAL": [
130130
{
131131
"default": "10",
132132
"implementation": "A",
133-
"type": "DECIMAL"
133+
"type": "decimal"
134134
}
135135
],
136136
"DD_TELEMETRY_LOG_COLLECTION_ENABLED": [
137137
{
138138
"default": "1",
139139
"implementation": "A",
140-
"type": "BOOLEAN"
140+
"type": "boolean"
141141
}
142142
],
143143
"DD_TELEMETRY_METRICS_ENABLED": [
144144
{
145145
"default": "1",
146146
"implementation": "A",
147-
"type": "BOOLEAN"
147+
"type": "boolean"
148148
}
149149
],
150150
"DD_TELEMETRY_METRICS_INTERVAL_SECONDS": [
151151
{
152152
"default": "60",
153153
"implementation": "A",
154-
"type": "DECIMAL"
154+
"type": "decimal"
155155
}
156156
],
157157
"DD_TRACE_128_BIT_TRACEID_GENERATION_ENABLED": [
158158
{
159159
"default": "1",
160160
"implementation": "A",
161-
"type": "BOOLEAN"
161+
"type": "boolean"
162162
}
163163
],
164164
"DD_TRACE_AGENT_PORT": [
165165
{
166166
"default": "8126",
167167
"implementation": "A",
168-
"type": "INT"
168+
"type": "int"
169169
}
170170
],
171171
"DD_TRACE_AGENT_URL": [
172172
{
173173
"default": "",
174174
"implementation": "A",
175-
"type": "STRING"
175+
"type": "string"
176176
}
177177
],
178178
"DD_TRACE_BAGGAGE_MAX_BYTES": [
179179
{
180180
"default": "8192",
181181
"implementation": "A",
182-
"type": "INT"
182+
"type": "int"
183183
}
184184
],
185185
"DD_TRACE_BAGGAGE_MAX_ITEMS": [
186186
{
187187
"default": "64",
188188
"implementation": "A",
189-
"type": "INT"
189+
"type": "int"
190190
}
191191
],
192192
"DD_TRACE_DEBUG": [
193193
{
194194
"default": "0",
195195
"implementation": "A",
196-
"type": "BOOLEAN"
196+
"type": "boolean"
197197
}
198198
],
199199
"DD_TRACE_ENABLED": [
200200
{
201201
"default": "1",
202202
"implementation": "A",
203-
"type": "BOOLEAN"
203+
"type": "boolean"
204204
}
205205
],
206206
"DD_TRACE_PROPAGATION_STYLE": [
207207
{
208208
"default": "datadog,tracecontext,baggage",
209209
"implementation": "A",
210-
"type": "ARRAY"
210+
"type": "array"
211211
}
212212
],
213213
"DD_TRACE_PROPAGATION_STYLE_EXTRACT": [
214214
{
215215
"default": "datadog,tracecontext,baggage",
216216
"implementation": "A",
217-
"type": "ARRAY"
217+
"type": "array"
218218
}
219219
],
220220
"DD_TRACE_PROPAGATION_STYLE_INJECT": [
221221
{
222222
"default": "datadog,tracecontext,baggage",
223223
"implementation": "A",
224-
"type": "ARRAY"
224+
"type": "array"
225225
}
226226
],
227227
"DD_TRACE_RATE_LIMIT": [
228228
{
229229
"default": "100",
230230
"implementation": "A",
231-
"type": "DECIMAL"
231+
"type": "decimal"
232232
}
233233
],
234234
"DD_TRACE_REPORT_HOSTNAME": [
235235
{
236236
"default": "0",
237237
"implementation": "A",
238-
"type": "BOOLEAN"
238+
"type": "boolean"
239239
}
240240
],
241241
"DD_TRACE_RESOURCE_RENAMING_ALWAYS_SIMPLIFIED_ENDPOINT": [
242242
{
243243
"default": "0",
244244
"implementation": "A",
245-
"type": "BOOLEAN"
245+
"type": "boolean"
246246
}
247247
],
248248
"DD_TRACE_RESOURCE_RENAMING_ENABLED": [
249249
{
250250
"default": "0",
251251
"implementation": "A",
252-
"type": "BOOLEAN"
252+
"type": "boolean"
253253
}
254254
],
255255
"DD_TRACE_SAMPLE_RATE": [
256256
{
257257
"default": "1",
258258
"implementation": "A",
259-
"type": "DECIMAL"
259+
"type": "decimal"
260260
}
261261
],
262262
"DD_TRACE_SAMPLING_RULES": [
263263
{
264264
"default": "[]",
265265
"implementation": "A",
266-
"type": "ARRAY"
266+
"type": "array"
267267
}
268268
],
269269
"DD_TRACE_STARTUP_LOGS": [
270270
{
271271
"default": "1",
272272
"implementation": "A",
273-
"type": "BOOLEAN"
273+
"type": "boolean"
274274
}
275275
],
276276
"DD_TRACE_TAGS_PROPAGATION_MAX_LENGTH": [
277277
{
278278
"default": "512",
279279
"implementation": "A",
280-
"type": "INT"
280+
"type": "int"
281281
}
282282
],
283283
"DD_VERSION": [
284284
{
285285
"default": "",
286286
"implementation": "A",
287-
"type": "STRING"
287+
"type": "string"
288288
}
289289
]
290290
},

tools/config-inversion/main.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#include <algorithm>
12
#include <cxxopts.hpp>
23
#include <filesystem>
34
#include <fstream>
@@ -33,7 +34,12 @@ nlohmann::json build_configuration() {
3334
auto obj = nlohmann::json::object(); \
3435
obj["default"] = to_string_any(DEFAULT_VALUE); \
3536
obj["implementation"] = "A"; \
36-
obj["type"] = QUOTED(TYPE); \
37+
{ \
38+
std::string type_str = QUOTED(TYPE); \
39+
std::transform(type_str.begin(), type_str.end(), type_str.begin(), \
40+
[](unsigned char c) { return std::tolower(c); }); \
41+
obj["type"] = type_str; \
42+
} \
3743
supported_configurations[QUOTED(NAME)] = nlohmann::json::array({obj}); \
3844
} while (0);
3945

0 commit comments

Comments
 (0)