@platformatic/nitro 4.0.0-new-config.2 → 4.0.0-new-config.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/config.d.ts +663 -667
- package/index.d.ts +8 -1
- package/index.js +7 -9
- package/package.json +7 -7
- package/schema.json +71 -40
package/config.d.ts
CHANGED
|
@@ -5,618 +5,44 @@
|
|
|
5
5
|
* and run json-schema-to-typescript to regenerate this file.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
+
export type ApplicationEntry = {
|
|
9
|
+
[k: string]: unknown;
|
|
10
|
+
};
|
|
11
|
+
|
|
8
12
|
export interface PlatformaticNitroConfig {
|
|
9
13
|
$schema?: string;
|
|
10
14
|
module?: string;
|
|
11
|
-
logger?:
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
[k: string]: unknown;
|
|
16
|
-
}
|
|
17
|
-
) &
|
|
18
|
-
string;
|
|
19
|
-
transport?:
|
|
20
|
-
| {
|
|
21
|
-
target?: string;
|
|
22
|
-
options?: {
|
|
23
|
-
[k: string]: unknown;
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
| {
|
|
27
|
-
targets?: {
|
|
28
|
-
target?: string;
|
|
29
|
-
options?: {
|
|
30
|
-
[k: string]: unknown;
|
|
31
|
-
};
|
|
32
|
-
level?: string;
|
|
33
|
-
}[];
|
|
34
|
-
options?: {
|
|
35
|
-
[k: string]: unknown;
|
|
36
|
-
};
|
|
37
|
-
};
|
|
38
|
-
pipeline?: {
|
|
39
|
-
target?: string;
|
|
40
|
-
options?: {
|
|
41
|
-
[k: string]: unknown;
|
|
42
|
-
};
|
|
43
|
-
};
|
|
44
|
-
formatters?: {
|
|
45
|
-
path: string;
|
|
46
|
-
};
|
|
47
|
-
timestamp?: "epochTime" | "unixTime" | "nullTime" | "isoTime";
|
|
48
|
-
redact?: {
|
|
49
|
-
paths: string[];
|
|
50
|
-
censor?: string;
|
|
51
|
-
};
|
|
52
|
-
base?: {
|
|
53
|
-
[k: string]: unknown;
|
|
54
|
-
} | null;
|
|
55
|
-
messageKey?: string;
|
|
56
|
-
customLevels?: {
|
|
57
|
-
[k: string]: unknown;
|
|
58
|
-
};
|
|
59
|
-
openTelemetryExporter?: {
|
|
60
|
-
protocol: "grpc" | "http";
|
|
61
|
-
url: string;
|
|
62
|
-
};
|
|
63
|
-
[k: string]: unknown;
|
|
64
|
-
};
|
|
65
|
-
server?: {
|
|
66
|
-
hostname?: string;
|
|
67
|
-
port?: number | string;
|
|
68
|
-
/**
|
|
69
|
-
* Configures how the port is assigned when the application runs multiple workers. When set to shared (the default), all workers listen on the same port (which requires SO_REUSEPORT support). When set to perWorkerIncrement, each worker listens on its own port, starting from port (worker 0) and incrementing by one for each additional worker.
|
|
70
|
-
*/
|
|
71
|
-
portAssignment?: "shared" | "perWorkerIncrement";
|
|
72
|
-
/**
|
|
73
|
-
* The maximum length of the queue of pending connections
|
|
74
|
-
*/
|
|
75
|
-
backlog?: number;
|
|
76
|
-
https?: {
|
|
77
|
-
allowHTTP1?: boolean;
|
|
78
|
-
key:
|
|
79
|
-
| string
|
|
80
|
-
| {
|
|
81
|
-
path?: string;
|
|
82
|
-
}
|
|
83
|
-
| (
|
|
84
|
-
| string
|
|
85
|
-
| {
|
|
86
|
-
path?: string;
|
|
87
|
-
}
|
|
88
|
-
)[];
|
|
89
|
-
cert:
|
|
90
|
-
| string
|
|
91
|
-
| {
|
|
92
|
-
path?: string;
|
|
93
|
-
}
|
|
94
|
-
| (
|
|
95
|
-
| string
|
|
96
|
-
| {
|
|
97
|
-
path?: string;
|
|
98
|
-
}
|
|
99
|
-
)[];
|
|
100
|
-
requestCert?: boolean;
|
|
101
|
-
rejectUnauthorized?: boolean;
|
|
102
|
-
};
|
|
103
|
-
};
|
|
104
|
-
watch?:
|
|
105
|
-
| {
|
|
106
|
-
enabled?: boolean | string;
|
|
107
|
-
/**
|
|
108
|
-
* @minItems 1
|
|
109
|
-
*/
|
|
110
|
-
allow?: [string, ...string[]];
|
|
111
|
-
ignore?: string[];
|
|
112
|
-
}
|
|
113
|
-
| boolean
|
|
114
|
-
| string;
|
|
115
|
-
application?: {
|
|
116
|
-
basePath?: string;
|
|
117
|
-
outputDirectory?: string;
|
|
118
|
-
include?: string[];
|
|
119
|
-
commands?: {
|
|
120
|
-
install?: string;
|
|
121
|
-
build?: string;
|
|
122
|
-
development?: string;
|
|
123
|
-
production?: string;
|
|
124
|
-
};
|
|
125
|
-
entrypointPort?: number;
|
|
126
|
-
changeDirectoryBeforeExecution?: boolean;
|
|
127
|
-
preferLocalCommands?: boolean;
|
|
128
|
-
processSpawner?: string;
|
|
129
|
-
};
|
|
15
|
+
logger?: AppLoggerOptions;
|
|
16
|
+
server?: AppServerOptions;
|
|
17
|
+
watch?: WatchOptions | boolean | string;
|
|
18
|
+
application?: BuildableApplicationOptions;
|
|
130
19
|
runtime?: {
|
|
131
20
|
preload?: string | string[];
|
|
132
|
-
extensions?:
|
|
133
|
-
| string
|
|
134
|
-
| {
|
|
135
|
-
path: string;
|
|
136
|
-
options?: {
|
|
137
|
-
[k: string]: unknown;
|
|
138
|
-
};
|
|
139
|
-
build?: boolean;
|
|
140
|
-
}
|
|
141
|
-
| (
|
|
142
|
-
| string
|
|
143
|
-
| {
|
|
144
|
-
path: string;
|
|
145
|
-
options?: {
|
|
146
|
-
[k: string]: unknown;
|
|
147
|
-
};
|
|
148
|
-
build?: boolean;
|
|
149
|
-
}
|
|
150
|
-
)[];
|
|
21
|
+
extensions?: string | ExtensionEntry | (string | ExtensionEntry1)[];
|
|
151
22
|
basePath?: string;
|
|
152
|
-
services?:
|
|
153
|
-
|
|
154
|
-
}[];
|
|
155
|
-
workers?:
|
|
156
|
-
| number
|
|
157
|
-
| string
|
|
158
|
-
| {
|
|
159
|
-
static?: number;
|
|
160
|
-
dynamic?: boolean;
|
|
161
|
-
minimum?: number;
|
|
162
|
-
maximum?: number;
|
|
163
|
-
total?: number;
|
|
164
|
-
maxMemory?: number;
|
|
165
|
-
cooldown?: number;
|
|
166
|
-
gracePeriod?: number;
|
|
167
|
-
scaleUpELU?: number;
|
|
168
|
-
scaleDownELU?: number;
|
|
169
|
-
[k: string]: unknown;
|
|
170
|
-
};
|
|
23
|
+
services?: ApplicationEntry[];
|
|
24
|
+
workers?: number | string | WorkersOptions;
|
|
171
25
|
workersRestartDelay?: number | string;
|
|
172
|
-
logger?:
|
|
173
|
-
level?: (
|
|
174
|
-
| ("fatal" | "error" | "warn" | "info" | "debug" | "trace" | "silent")
|
|
175
|
-
| {
|
|
176
|
-
[k: string]: unknown;
|
|
177
|
-
}
|
|
178
|
-
) &
|
|
179
|
-
string;
|
|
180
|
-
transport?:
|
|
181
|
-
| {
|
|
182
|
-
target?: string;
|
|
183
|
-
options?: {
|
|
184
|
-
[k: string]: unknown;
|
|
185
|
-
};
|
|
186
|
-
}
|
|
187
|
-
| {
|
|
188
|
-
targets?: {
|
|
189
|
-
target?: string;
|
|
190
|
-
options?: {
|
|
191
|
-
[k: string]: unknown;
|
|
192
|
-
};
|
|
193
|
-
level?: string;
|
|
194
|
-
}[];
|
|
195
|
-
options?: {
|
|
196
|
-
[k: string]: unknown;
|
|
197
|
-
};
|
|
198
|
-
};
|
|
199
|
-
pipeline?: {
|
|
200
|
-
target?: string;
|
|
201
|
-
options?: {
|
|
202
|
-
[k: string]: unknown;
|
|
203
|
-
};
|
|
204
|
-
};
|
|
205
|
-
formatters?: {
|
|
206
|
-
path: string;
|
|
207
|
-
};
|
|
208
|
-
timestamp?: "epochTime" | "unixTime" | "nullTime" | "isoTime";
|
|
209
|
-
redact?: {
|
|
210
|
-
paths: string[];
|
|
211
|
-
censor?: string;
|
|
212
|
-
};
|
|
213
|
-
base?: {
|
|
214
|
-
[k: string]: unknown;
|
|
215
|
-
} | null;
|
|
216
|
-
messageKey?: string;
|
|
217
|
-
customLevels?: {
|
|
218
|
-
[k: string]: unknown;
|
|
219
|
-
};
|
|
220
|
-
openTelemetryExporter?: {
|
|
221
|
-
protocol: "grpc" | "http";
|
|
222
|
-
url: string;
|
|
223
|
-
};
|
|
224
|
-
[k: string]: unknown;
|
|
225
|
-
};
|
|
26
|
+
logger?: AppLoggerOptions1;
|
|
226
27
|
reuseTcpPorts?: boolean;
|
|
227
28
|
startTimeout?: number;
|
|
228
29
|
restartOnError?: boolean | number;
|
|
229
30
|
exitOnUnhandledErrors?: boolean | number;
|
|
230
|
-
gracefulShutdown?:
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
*/
|
|
236
|
-
closeConnections?: boolean;
|
|
237
|
-
};
|
|
238
|
-
health?: {
|
|
239
|
-
enabled?: boolean | string;
|
|
240
|
-
interval?: number | string;
|
|
241
|
-
gracePeriod?: number | string;
|
|
242
|
-
maxUnhealthyChecks?: number | string;
|
|
243
|
-
maxELU?: number | string;
|
|
244
|
-
maxEventLoopDelay?: number | string;
|
|
245
|
-
maxEventLoopDelayP99?: number | string;
|
|
246
|
-
maxHeapUsed?: number | string;
|
|
247
|
-
maxHeapTotal?: number | string;
|
|
248
|
-
maxYoungGeneration?: number | string;
|
|
249
|
-
codeRangeSize?: number | string;
|
|
250
|
-
bufferPoolSize?: number | string;
|
|
251
|
-
defaultHighWaterMark?: number | string;
|
|
252
|
-
};
|
|
253
|
-
healthProbes?:
|
|
254
|
-
| boolean
|
|
255
|
-
| string
|
|
256
|
-
| {
|
|
257
|
-
enabled?: boolean | string;
|
|
258
|
-
hostname?: string;
|
|
259
|
-
port?: number | string;
|
|
260
|
-
readiness?:
|
|
261
|
-
| boolean
|
|
262
|
-
| {
|
|
263
|
-
endpoint?: string;
|
|
264
|
-
success?: {
|
|
265
|
-
statusCode?: number;
|
|
266
|
-
body?: string;
|
|
267
|
-
};
|
|
268
|
-
fail?: {
|
|
269
|
-
statusCode?: number;
|
|
270
|
-
body?: string;
|
|
271
|
-
};
|
|
272
|
-
};
|
|
273
|
-
liveness?:
|
|
274
|
-
| boolean
|
|
275
|
-
| {
|
|
276
|
-
endpoint?: string;
|
|
277
|
-
success?: {
|
|
278
|
-
statusCode?: number;
|
|
279
|
-
body?: string;
|
|
280
|
-
};
|
|
281
|
-
fail?: {
|
|
282
|
-
statusCode?: number;
|
|
283
|
-
body?: string;
|
|
284
|
-
};
|
|
285
|
-
};
|
|
286
|
-
};
|
|
287
|
-
undici?: {
|
|
288
|
-
agentOptions?: {
|
|
289
|
-
[k: string]: unknown;
|
|
290
|
-
};
|
|
291
|
-
interceptors?:
|
|
292
|
-
| {
|
|
293
|
-
module: string;
|
|
294
|
-
options: {
|
|
295
|
-
[k: string]: unknown;
|
|
296
|
-
};
|
|
297
|
-
[k: string]: unknown;
|
|
298
|
-
}[]
|
|
299
|
-
| {
|
|
300
|
-
Client?: {
|
|
301
|
-
module: string;
|
|
302
|
-
options: {
|
|
303
|
-
[k: string]: unknown;
|
|
304
|
-
};
|
|
305
|
-
[k: string]: unknown;
|
|
306
|
-
}[];
|
|
307
|
-
Pool?: {
|
|
308
|
-
module: string;
|
|
309
|
-
options: {
|
|
310
|
-
[k: string]: unknown;
|
|
311
|
-
};
|
|
312
|
-
[k: string]: unknown;
|
|
313
|
-
}[];
|
|
314
|
-
Agent?: {
|
|
315
|
-
module: string;
|
|
316
|
-
options: {
|
|
317
|
-
[k: string]: unknown;
|
|
318
|
-
};
|
|
319
|
-
[k: string]: unknown;
|
|
320
|
-
}[];
|
|
321
|
-
[k: string]: unknown;
|
|
322
|
-
};
|
|
323
|
-
[k: string]: unknown;
|
|
324
|
-
};
|
|
325
|
-
httpCache?:
|
|
326
|
-
| boolean
|
|
327
|
-
| {
|
|
328
|
-
store?: string;
|
|
329
|
-
/**
|
|
330
|
-
* @minItems 1
|
|
331
|
-
*/
|
|
332
|
-
methods?: [string, ...string[]];
|
|
333
|
-
cacheTagsHeader?: string;
|
|
334
|
-
maxSize?: number;
|
|
335
|
-
maxEntrySize?: number;
|
|
336
|
-
maxCount?: number;
|
|
337
|
-
/**
|
|
338
|
-
* Whitelist of origins to cache. Supports exact strings and regex patterns (e.g., "/https:\\/\\/.*\\.example\\.com/").
|
|
339
|
-
*/
|
|
340
|
-
origins?: string[];
|
|
341
|
-
/**
|
|
342
|
-
* Default cache duration in seconds for responses without explicit expiration headers.
|
|
343
|
-
*/
|
|
344
|
-
cacheByDefault?: number;
|
|
345
|
-
/**
|
|
346
|
-
* Cache type. "shared" caches may be shared between users, "private" caches are user-specific.
|
|
347
|
-
*/
|
|
348
|
-
type?: "shared" | "private";
|
|
349
|
-
[k: string]: unknown;
|
|
350
|
-
};
|
|
31
|
+
gracefulShutdown?: GracefulShutdownOptions;
|
|
32
|
+
health?: HealthOptions;
|
|
33
|
+
healthProbes?: boolean | string | HealthProbesOptions;
|
|
34
|
+
undici?: UndiciOptions;
|
|
35
|
+
httpCache?: boolean | HttpCacheOptions;
|
|
351
36
|
watch?: boolean | string;
|
|
352
|
-
managementApi?:
|
|
353
|
-
| boolean
|
|
354
|
-
| string
|
|
355
|
-
| {
|
|
356
|
-
logs?: {
|
|
357
|
-
maxSize?: number;
|
|
358
|
-
};
|
|
359
|
-
/**
|
|
360
|
-
* Custom path for the control socket. If not specified, uses the default platform-specific location.
|
|
361
|
-
*/
|
|
362
|
-
socket?: string;
|
|
363
|
-
};
|
|
37
|
+
managementApi?: boolean | string | ManagementApiOptions;
|
|
364
38
|
management?:
|
|
365
39
|
| boolean
|
|
366
40
|
| {
|
|
367
41
|
enabled?: boolean;
|
|
368
42
|
operations?: string[];
|
|
369
43
|
};
|
|
370
|
-
metrics?:
|
|
371
|
-
|
|
372
|
-
| {
|
|
373
|
-
port?: number | string;
|
|
374
|
-
enabled?: boolean | string;
|
|
375
|
-
hostname?: string;
|
|
376
|
-
endpoint?: string;
|
|
377
|
-
https?: {
|
|
378
|
-
allowHTTP1?: boolean;
|
|
379
|
-
key:
|
|
380
|
-
| string
|
|
381
|
-
| {
|
|
382
|
-
path?: string;
|
|
383
|
-
}
|
|
384
|
-
| (
|
|
385
|
-
| string
|
|
386
|
-
| {
|
|
387
|
-
path?: string;
|
|
388
|
-
}
|
|
389
|
-
)[];
|
|
390
|
-
cert:
|
|
391
|
-
| string
|
|
392
|
-
| {
|
|
393
|
-
path?: string;
|
|
394
|
-
}
|
|
395
|
-
| (
|
|
396
|
-
| string
|
|
397
|
-
| {
|
|
398
|
-
path?: string;
|
|
399
|
-
}
|
|
400
|
-
)[];
|
|
401
|
-
requestCert?: boolean;
|
|
402
|
-
rejectUnauthorized?: boolean;
|
|
403
|
-
};
|
|
404
|
-
auth?: {
|
|
405
|
-
username: string;
|
|
406
|
-
password: string;
|
|
407
|
-
};
|
|
408
|
-
labels?: {
|
|
409
|
-
[k: string]: string;
|
|
410
|
-
};
|
|
411
|
-
/**
|
|
412
|
-
* The label name to use for the application identifier in metrics (e.g., applicationId, serviceId)
|
|
413
|
-
*/
|
|
414
|
-
applicationLabel?: string;
|
|
415
|
-
/**
|
|
416
|
-
* Enable outgoing HTTP client request duration metrics
|
|
417
|
-
*/
|
|
418
|
-
httpClientMetrics?: boolean | string;
|
|
419
|
-
readiness?:
|
|
420
|
-
| boolean
|
|
421
|
-
| {
|
|
422
|
-
endpoint?: string;
|
|
423
|
-
success?: {
|
|
424
|
-
statusCode?: number;
|
|
425
|
-
body?: string;
|
|
426
|
-
};
|
|
427
|
-
fail?: {
|
|
428
|
-
statusCode?: number;
|
|
429
|
-
body?: string;
|
|
430
|
-
};
|
|
431
|
-
};
|
|
432
|
-
liveness?:
|
|
433
|
-
| boolean
|
|
434
|
-
| {
|
|
435
|
-
endpoint?: string;
|
|
436
|
-
success?: {
|
|
437
|
-
statusCode?: number;
|
|
438
|
-
body?: string;
|
|
439
|
-
};
|
|
440
|
-
fail?: {
|
|
441
|
-
statusCode?: number;
|
|
442
|
-
body?: string;
|
|
443
|
-
};
|
|
444
|
-
};
|
|
445
|
-
/**
|
|
446
|
-
* @deprecated
|
|
447
|
-
* Deprecated. Health probe timeout configuration is no longer used.
|
|
448
|
-
*/
|
|
449
|
-
healthChecksTimeouts?: number | string;
|
|
450
|
-
plugins?: string[];
|
|
451
|
-
timeout?: number | string;
|
|
452
|
-
/**
|
|
453
|
-
* Configuration for exporting metrics to an OTLP endpoint
|
|
454
|
-
*/
|
|
455
|
-
otlpExporter?: {
|
|
456
|
-
/**
|
|
457
|
-
* Enable or disable OTLP metrics export
|
|
458
|
-
*/
|
|
459
|
-
enabled?: boolean | string;
|
|
460
|
-
/**
|
|
461
|
-
* OTLP endpoint URL (e.g., http://collector:4318/v1/metrics)
|
|
462
|
-
*/
|
|
463
|
-
endpoint: string;
|
|
464
|
-
/**
|
|
465
|
-
* Interval in milliseconds between metric pushes
|
|
466
|
-
*/
|
|
467
|
-
interval?: number | string;
|
|
468
|
-
/**
|
|
469
|
-
* Additional HTTP headers for authentication
|
|
470
|
-
*/
|
|
471
|
-
headers?: {
|
|
472
|
-
[k: string]: string;
|
|
473
|
-
};
|
|
474
|
-
/**
|
|
475
|
-
* Service name for OTLP resource attributes
|
|
476
|
-
*/
|
|
477
|
-
serviceName?: string;
|
|
478
|
-
/**
|
|
479
|
-
* Service version for OTLP resource attributes
|
|
480
|
-
*/
|
|
481
|
-
serviceVersion?: string;
|
|
482
|
-
};
|
|
483
|
-
/**
|
|
484
|
-
* Configuration for forwarding user OpenTelemetry metrics to an OTLP endpoint
|
|
485
|
-
*/
|
|
486
|
-
opentelemetry?: {
|
|
487
|
-
/**
|
|
488
|
-
* Enable or disable OpenTelemetry metrics forwarding
|
|
489
|
-
*/
|
|
490
|
-
enabled?: boolean | string;
|
|
491
|
-
/**
|
|
492
|
-
* OTLP metrics endpoint URL (e.g., http://collector:4318/v1/metrics)
|
|
493
|
-
*/
|
|
494
|
-
endpoint: string;
|
|
495
|
-
/**
|
|
496
|
-
* Interval in milliseconds between metric forwards
|
|
497
|
-
*/
|
|
498
|
-
interval?: number | string;
|
|
499
|
-
/**
|
|
500
|
-
* Additional HTTP headers for authentication
|
|
501
|
-
*/
|
|
502
|
-
headers?: {
|
|
503
|
-
[k: string]: string;
|
|
504
|
-
};
|
|
505
|
-
};
|
|
506
|
-
/**
|
|
507
|
-
* Custom labels to add to HTTP metrics (http_request_all_duration_seconds). Each label extracts its value from an HTTP request header.
|
|
508
|
-
*/
|
|
509
|
-
httpCustomLabels?: {
|
|
510
|
-
/**
|
|
511
|
-
* The label name to use in metrics
|
|
512
|
-
*/
|
|
513
|
-
name: string;
|
|
514
|
-
/**
|
|
515
|
-
* The HTTP request header to extract the value from
|
|
516
|
-
*/
|
|
517
|
-
header: string;
|
|
518
|
-
/**
|
|
519
|
-
* Default value when header is missing (defaults to "unknown")
|
|
520
|
-
*/
|
|
521
|
-
default?: string;
|
|
522
|
-
}[];
|
|
523
|
-
};
|
|
524
|
-
telemetry?: {
|
|
525
|
-
enabled?: boolean | string;
|
|
526
|
-
/**
|
|
527
|
-
* The name of the application. Defaults to the folder name if not specified.
|
|
528
|
-
*/
|
|
529
|
-
applicationName: string;
|
|
530
|
-
/**
|
|
531
|
-
* The version of the application (optional)
|
|
532
|
-
*/
|
|
533
|
-
version?: string;
|
|
534
|
-
/**
|
|
535
|
-
* An array of paths to skip when creating spans. Useful for health checks and other endpoints that do not need to be traced.
|
|
536
|
-
*/
|
|
537
|
-
skip?: {
|
|
538
|
-
/**
|
|
539
|
-
* The path to skip. Can be a string or a regex.
|
|
540
|
-
*/
|
|
541
|
-
path?: string;
|
|
542
|
-
/**
|
|
543
|
-
* HTTP method to skip
|
|
544
|
-
*/
|
|
545
|
-
method?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS";
|
|
546
|
-
[k: string]: unknown;
|
|
547
|
-
}[];
|
|
548
|
-
exporter?:
|
|
549
|
-
| {
|
|
550
|
-
type?: "console" | "otlp" | "zipkin" | "memory" | "file";
|
|
551
|
-
/**
|
|
552
|
-
* Options for the exporter. These are passed directly to the exporter.
|
|
553
|
-
*/
|
|
554
|
-
options?: {
|
|
555
|
-
/**
|
|
556
|
-
* The URL to send the traces to. Not used for console or memory exporters.
|
|
557
|
-
*/
|
|
558
|
-
url?: string;
|
|
559
|
-
/**
|
|
560
|
-
* Headers to send to the exporter. Not used for console or memory exporters.
|
|
561
|
-
*/
|
|
562
|
-
headers?: {
|
|
563
|
-
[k: string]: unknown;
|
|
564
|
-
};
|
|
565
|
-
/**
|
|
566
|
-
* The path to write the traces to. Only for file exporter.
|
|
567
|
-
*/
|
|
568
|
-
path?: string;
|
|
569
|
-
/**
|
|
570
|
-
* The OTLP transport protocol to use. Only for the otlp exporter. Defaults to http.
|
|
571
|
-
*/
|
|
572
|
-
protocol?: "http" | "grpc";
|
|
573
|
-
/**
|
|
574
|
-
* Alias for protocol. Only for the otlp exporter. Defaults to http.
|
|
575
|
-
*/
|
|
576
|
-
transport?: "http" | "grpc";
|
|
577
|
-
[k: string]: unknown;
|
|
578
|
-
};
|
|
579
|
-
additionalProperties?: never;
|
|
580
|
-
[k: string]: unknown;
|
|
581
|
-
}[]
|
|
582
|
-
| {
|
|
583
|
-
type?: "console" | "otlp" | "zipkin" | "memory" | "file";
|
|
584
|
-
/**
|
|
585
|
-
* Options for the exporter. These are passed directly to the exporter.
|
|
586
|
-
*/
|
|
587
|
-
options?: {
|
|
588
|
-
/**
|
|
589
|
-
* The URL to send the traces to. Not used for console or memory exporters.
|
|
590
|
-
*/
|
|
591
|
-
url?: string;
|
|
592
|
-
/**
|
|
593
|
-
* Headers to send to the exporter. Not used for console or memory exporters.
|
|
594
|
-
*/
|
|
595
|
-
headers?: {
|
|
596
|
-
[k: string]: unknown;
|
|
597
|
-
};
|
|
598
|
-
/**
|
|
599
|
-
* The path to write the traces to. Only for file exporter.
|
|
600
|
-
*/
|
|
601
|
-
path?: string;
|
|
602
|
-
/**
|
|
603
|
-
* The OTLP transport protocol to use. Only for the otlp exporter. Defaults to http.
|
|
604
|
-
*/
|
|
605
|
-
protocol?: "http" | "grpc";
|
|
606
|
-
/**
|
|
607
|
-
* Alias for protocol. Only for the otlp exporter. Defaults to http.
|
|
608
|
-
*/
|
|
609
|
-
transport?: "http" | "grpc";
|
|
610
|
-
[k: string]: unknown;
|
|
611
|
-
};
|
|
612
|
-
additionalProperties?: never;
|
|
613
|
-
[k: string]: unknown;
|
|
614
|
-
};
|
|
615
|
-
/**
|
|
616
|
-
* Enable the OpenTelemetry diagnostic logger. Diagnostic messages are forwarded to the Platformatic global logger using the current logger level.
|
|
617
|
-
*/
|
|
618
|
-
diagLogger?: boolean | string;
|
|
619
|
-
};
|
|
44
|
+
metrics?: boolean | MetricsOptions;
|
|
45
|
+
tracing?: TelemetryOptions;
|
|
620
46
|
verticalScaler?: {
|
|
621
47
|
enabled?: boolean;
|
|
622
48
|
maxTotalWorkers?: number;
|
|
@@ -686,46 +112,11 @@ export interface PlatformaticNitroConfig {
|
|
|
686
112
|
[k: string]: string | [string, ...string[]];
|
|
687
113
|
};
|
|
688
114
|
};
|
|
689
|
-
compileCache?:
|
|
690
|
-
| boolean
|
|
691
|
-
| {
|
|
692
|
-
/**
|
|
693
|
-
* Enable Node.js module compile cache for faster startup
|
|
694
|
-
*/
|
|
695
|
-
enabled?: boolean;
|
|
696
|
-
/**
|
|
697
|
-
* Directory to store compile cache. Defaults to .plt/compile-cache in app root
|
|
698
|
-
*/
|
|
699
|
-
directory?: string;
|
|
700
|
-
};
|
|
115
|
+
compileCache?: boolean | CompileCacheOptions;
|
|
701
116
|
application?: {
|
|
702
117
|
reuseTcpPorts?: boolean;
|
|
703
|
-
workers?:
|
|
704
|
-
|
|
705
|
-
| string
|
|
706
|
-
| {
|
|
707
|
-
static?: number;
|
|
708
|
-
minimum?: number;
|
|
709
|
-
maximum?: number;
|
|
710
|
-
scaleUpELU?: number;
|
|
711
|
-
scaleDownELU?: number;
|
|
712
|
-
[k: string]: unknown;
|
|
713
|
-
};
|
|
714
|
-
health?: {
|
|
715
|
-
enabled?: boolean | string;
|
|
716
|
-
interval?: number | string;
|
|
717
|
-
gracePeriod?: number | string;
|
|
718
|
-
maxUnhealthyChecks?: number | string;
|
|
719
|
-
maxELU?: number | string;
|
|
720
|
-
maxEventLoopDelay?: number | string;
|
|
721
|
-
maxEventLoopDelayP99?: number | string;
|
|
722
|
-
maxHeapUsed?: number | string;
|
|
723
|
-
maxHeapTotal?: number | string;
|
|
724
|
-
maxYoungGeneration?: number | string;
|
|
725
|
-
codeRangeSize?: number | string;
|
|
726
|
-
bufferPoolSize?: number | string;
|
|
727
|
-
defaultHighWaterMark?: number | string;
|
|
728
|
-
};
|
|
118
|
+
workers?: number | string | ApplicationWorkersOptions;
|
|
119
|
+
health?: ApplicationHealthOptions;
|
|
729
120
|
/**
|
|
730
121
|
* Overrides the runtime-level restartOnError for this application. Set to false or 0 to never restart the application when it crashes, a positive number to wait that amount of milliseconds between restarts, or true to use the default delay.
|
|
731
122
|
*/
|
|
@@ -741,41 +132,9 @@ export interface PlatformaticNitroConfig {
|
|
|
741
132
|
preload?: string | string[];
|
|
742
133
|
nodeOptions?: string;
|
|
743
134
|
execArgv?: string[];
|
|
744
|
-
permissions?:
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
write?: string[];
|
|
748
|
-
};
|
|
749
|
-
};
|
|
750
|
-
telemetry?: {
|
|
751
|
-
/**
|
|
752
|
-
* An array of instrumentations loaded if telemetry is enabled
|
|
753
|
-
*/
|
|
754
|
-
instrumentations?: (
|
|
755
|
-
| string
|
|
756
|
-
| {
|
|
757
|
-
package: string;
|
|
758
|
-
exportName?: string;
|
|
759
|
-
options?: {
|
|
760
|
-
[k: string]: unknown;
|
|
761
|
-
};
|
|
762
|
-
[k: string]: unknown;
|
|
763
|
-
}
|
|
764
|
-
)[];
|
|
765
|
-
[k: string]: unknown;
|
|
766
|
-
};
|
|
767
|
-
compileCache?:
|
|
768
|
-
| boolean
|
|
769
|
-
| {
|
|
770
|
-
/**
|
|
771
|
-
* Enable Node.js module compile cache for faster startup
|
|
772
|
-
*/
|
|
773
|
-
enabled?: boolean;
|
|
774
|
-
/**
|
|
775
|
-
* Directory to store compile cache. Defaults to .plt/compile-cache in app root
|
|
776
|
-
*/
|
|
777
|
-
directory?: string;
|
|
778
|
-
};
|
|
135
|
+
permissions?: PermissionsOptions;
|
|
136
|
+
tracing?: ApplicationTelemetryOverrides;
|
|
137
|
+
compileCache?: boolean | CompileCacheOptions1;
|
|
779
138
|
};
|
|
780
139
|
};
|
|
781
140
|
vite?: {
|
|
@@ -789,3 +148,640 @@ export interface PlatformaticNitroConfig {
|
|
|
789
148
|
entrypoint?: string;
|
|
790
149
|
};
|
|
791
150
|
}
|
|
151
|
+
export interface AppLoggerOptions {
|
|
152
|
+
level?: (
|
|
153
|
+
| ("fatal" | "error" | "warn" | "info" | "debug" | "trace" | "silent")
|
|
154
|
+
| {
|
|
155
|
+
[k: string]: unknown;
|
|
156
|
+
}
|
|
157
|
+
) &
|
|
158
|
+
string;
|
|
159
|
+
transport?:
|
|
160
|
+
| {
|
|
161
|
+
target?: string;
|
|
162
|
+
options?: {
|
|
163
|
+
[k: string]: unknown;
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
| {
|
|
167
|
+
targets?: {
|
|
168
|
+
target?: string;
|
|
169
|
+
options?: {
|
|
170
|
+
[k: string]: unknown;
|
|
171
|
+
};
|
|
172
|
+
level?: string;
|
|
173
|
+
}[];
|
|
174
|
+
options?: {
|
|
175
|
+
[k: string]: unknown;
|
|
176
|
+
};
|
|
177
|
+
};
|
|
178
|
+
pipeline?: {
|
|
179
|
+
target?: string;
|
|
180
|
+
options?: {
|
|
181
|
+
[k: string]: unknown;
|
|
182
|
+
};
|
|
183
|
+
};
|
|
184
|
+
formatters?: {
|
|
185
|
+
path: string;
|
|
186
|
+
};
|
|
187
|
+
timestamp?: "epochTime" | "unixTime" | "nullTime" | "isoTime";
|
|
188
|
+
redact?: {
|
|
189
|
+
paths: string[];
|
|
190
|
+
censor?: string;
|
|
191
|
+
};
|
|
192
|
+
base?: {
|
|
193
|
+
[k: string]: unknown;
|
|
194
|
+
} | null;
|
|
195
|
+
messageKey?: string;
|
|
196
|
+
customLevels?: {
|
|
197
|
+
[k: string]: unknown;
|
|
198
|
+
};
|
|
199
|
+
openTelemetryExporter?: {
|
|
200
|
+
protocol: "grpc" | "http";
|
|
201
|
+
url: string;
|
|
202
|
+
};
|
|
203
|
+
[k: string]: unknown;
|
|
204
|
+
}
|
|
205
|
+
export interface AppServerOptions {
|
|
206
|
+
hostname?: string;
|
|
207
|
+
port?: number | string;
|
|
208
|
+
/**
|
|
209
|
+
* Configures how the port is assigned when the application runs multiple workers. When set to shared (the default), all workers listen on the same port (which requires SO_REUSEPORT support). When set to perWorkerIncrement, each worker listens on its own port, starting from port (worker 0) and incrementing by one for each additional worker.
|
|
210
|
+
*/
|
|
211
|
+
portAssignment?: "shared" | "perWorkerIncrement";
|
|
212
|
+
/**
|
|
213
|
+
* The maximum length of the queue of pending connections
|
|
214
|
+
*/
|
|
215
|
+
backlog?: number;
|
|
216
|
+
https?: HttpsOptions;
|
|
217
|
+
}
|
|
218
|
+
export interface HttpsOptions {
|
|
219
|
+
allowHTTP1?: boolean;
|
|
220
|
+
key:
|
|
221
|
+
| string
|
|
222
|
+
| {
|
|
223
|
+
path?: string;
|
|
224
|
+
}
|
|
225
|
+
| (
|
|
226
|
+
| string
|
|
227
|
+
| {
|
|
228
|
+
path?: string;
|
|
229
|
+
}
|
|
230
|
+
)[];
|
|
231
|
+
cert:
|
|
232
|
+
| string
|
|
233
|
+
| {
|
|
234
|
+
path?: string;
|
|
235
|
+
}
|
|
236
|
+
| (
|
|
237
|
+
| string
|
|
238
|
+
| {
|
|
239
|
+
path?: string;
|
|
240
|
+
}
|
|
241
|
+
)[];
|
|
242
|
+
requestCert?: boolean;
|
|
243
|
+
rejectUnauthorized?: boolean;
|
|
244
|
+
}
|
|
245
|
+
export interface WatchOptions {
|
|
246
|
+
enabled?: boolean | string;
|
|
247
|
+
/**
|
|
248
|
+
* @minItems 1
|
|
249
|
+
*/
|
|
250
|
+
allow?: [string, ...string[]];
|
|
251
|
+
ignore?: string[];
|
|
252
|
+
}
|
|
253
|
+
export interface BuildableApplicationOptions {
|
|
254
|
+
basePath?: string;
|
|
255
|
+
outputDirectory?: string;
|
|
256
|
+
include?: string[];
|
|
257
|
+
commands?: {
|
|
258
|
+
install?: string;
|
|
259
|
+
build?: string;
|
|
260
|
+
development?: string;
|
|
261
|
+
production?: string;
|
|
262
|
+
};
|
|
263
|
+
changeDirectoryBeforeExecution?: boolean;
|
|
264
|
+
preferLocalCommands?: boolean;
|
|
265
|
+
processSpawner?: string;
|
|
266
|
+
}
|
|
267
|
+
export interface ExtensionEntry {
|
|
268
|
+
path: string;
|
|
269
|
+
options?: {
|
|
270
|
+
[k: string]: unknown;
|
|
271
|
+
};
|
|
272
|
+
build?: boolean;
|
|
273
|
+
}
|
|
274
|
+
export interface ExtensionEntry1 {
|
|
275
|
+
path: string;
|
|
276
|
+
options?: {
|
|
277
|
+
[k: string]: unknown;
|
|
278
|
+
};
|
|
279
|
+
build?: boolean;
|
|
280
|
+
}
|
|
281
|
+
export interface WorkersOptions {
|
|
282
|
+
static?: number;
|
|
283
|
+
dynamic?: boolean;
|
|
284
|
+
minimum?: number;
|
|
285
|
+
maximum?: number;
|
|
286
|
+
total?: number;
|
|
287
|
+
maxMemory?: number;
|
|
288
|
+
cooldown?: number;
|
|
289
|
+
gracePeriod?: number;
|
|
290
|
+
scaleUpELU?: number;
|
|
291
|
+
scaleDownELU?: number;
|
|
292
|
+
[k: string]: unknown;
|
|
293
|
+
}
|
|
294
|
+
export interface AppLoggerOptions1 {
|
|
295
|
+
level?: (
|
|
296
|
+
| ("fatal" | "error" | "warn" | "info" | "debug" | "trace" | "silent")
|
|
297
|
+
| {
|
|
298
|
+
[k: string]: unknown;
|
|
299
|
+
}
|
|
300
|
+
) &
|
|
301
|
+
string;
|
|
302
|
+
transport?:
|
|
303
|
+
| {
|
|
304
|
+
target?: string;
|
|
305
|
+
options?: {
|
|
306
|
+
[k: string]: unknown;
|
|
307
|
+
};
|
|
308
|
+
}
|
|
309
|
+
| {
|
|
310
|
+
targets?: {
|
|
311
|
+
target?: string;
|
|
312
|
+
options?: {
|
|
313
|
+
[k: string]: unknown;
|
|
314
|
+
};
|
|
315
|
+
level?: string;
|
|
316
|
+
}[];
|
|
317
|
+
options?: {
|
|
318
|
+
[k: string]: unknown;
|
|
319
|
+
};
|
|
320
|
+
};
|
|
321
|
+
pipeline?: {
|
|
322
|
+
target?: string;
|
|
323
|
+
options?: {
|
|
324
|
+
[k: string]: unknown;
|
|
325
|
+
};
|
|
326
|
+
};
|
|
327
|
+
formatters?: {
|
|
328
|
+
path: string;
|
|
329
|
+
};
|
|
330
|
+
timestamp?: "epochTime" | "unixTime" | "nullTime" | "isoTime";
|
|
331
|
+
redact?: {
|
|
332
|
+
paths: string[];
|
|
333
|
+
censor?: string;
|
|
334
|
+
};
|
|
335
|
+
base?: {
|
|
336
|
+
[k: string]: unknown;
|
|
337
|
+
} | null;
|
|
338
|
+
messageKey?: string;
|
|
339
|
+
customLevels?: {
|
|
340
|
+
[k: string]: unknown;
|
|
341
|
+
};
|
|
342
|
+
openTelemetryExporter?: {
|
|
343
|
+
protocol: "grpc" | "http";
|
|
344
|
+
url: string;
|
|
345
|
+
};
|
|
346
|
+
[k: string]: unknown;
|
|
347
|
+
}
|
|
348
|
+
export interface GracefulShutdownOptions {
|
|
349
|
+
runtime: number | string;
|
|
350
|
+
application: number | string;
|
|
351
|
+
/**
|
|
352
|
+
* Add Connection: close header to HTTP responses during graceful shutdown
|
|
353
|
+
*/
|
|
354
|
+
closeConnections?: boolean;
|
|
355
|
+
}
|
|
356
|
+
export interface HealthOptions {
|
|
357
|
+
enabled?: boolean | string;
|
|
358
|
+
interval?: number | string;
|
|
359
|
+
gracePeriod?: number | string;
|
|
360
|
+
maxUnhealthyChecks?: number | string;
|
|
361
|
+
maxELU?: number | string;
|
|
362
|
+
maxEventLoopDelay?: number | string;
|
|
363
|
+
maxEventLoopDelayP99?: number | string;
|
|
364
|
+
maxHeapUsed?: number | string;
|
|
365
|
+
maxHeapTotal?: number | string;
|
|
366
|
+
maxYoungGeneration?: number | string;
|
|
367
|
+
codeRangeSize?: number | string;
|
|
368
|
+
bufferPoolSize?: number | string;
|
|
369
|
+
defaultHighWaterMark?: number | string;
|
|
370
|
+
}
|
|
371
|
+
export interface HealthProbesOptions {
|
|
372
|
+
enabled?: boolean | string;
|
|
373
|
+
hostname?: string;
|
|
374
|
+
port?: number | string;
|
|
375
|
+
readiness?:
|
|
376
|
+
| boolean
|
|
377
|
+
| {
|
|
378
|
+
endpoint?: string;
|
|
379
|
+
success?: {
|
|
380
|
+
statusCode?: number;
|
|
381
|
+
body?: string;
|
|
382
|
+
};
|
|
383
|
+
fail?: {
|
|
384
|
+
statusCode?: number;
|
|
385
|
+
body?: string;
|
|
386
|
+
};
|
|
387
|
+
};
|
|
388
|
+
liveness?:
|
|
389
|
+
| boolean
|
|
390
|
+
| {
|
|
391
|
+
endpoint?: string;
|
|
392
|
+
success?: {
|
|
393
|
+
statusCode?: number;
|
|
394
|
+
body?: string;
|
|
395
|
+
};
|
|
396
|
+
fail?: {
|
|
397
|
+
statusCode?: number;
|
|
398
|
+
body?: string;
|
|
399
|
+
};
|
|
400
|
+
};
|
|
401
|
+
}
|
|
402
|
+
export interface UndiciOptions {
|
|
403
|
+
agentOptions?: {
|
|
404
|
+
[k: string]: unknown;
|
|
405
|
+
};
|
|
406
|
+
interceptors?:
|
|
407
|
+
| {
|
|
408
|
+
module: string;
|
|
409
|
+
options: {
|
|
410
|
+
[k: string]: unknown;
|
|
411
|
+
};
|
|
412
|
+
[k: string]: unknown;
|
|
413
|
+
}[]
|
|
414
|
+
| {
|
|
415
|
+
Client?: {
|
|
416
|
+
module: string;
|
|
417
|
+
options: {
|
|
418
|
+
[k: string]: unknown;
|
|
419
|
+
};
|
|
420
|
+
[k: string]: unknown;
|
|
421
|
+
}[];
|
|
422
|
+
Pool?: {
|
|
423
|
+
module: string;
|
|
424
|
+
options: {
|
|
425
|
+
[k: string]: unknown;
|
|
426
|
+
};
|
|
427
|
+
[k: string]: unknown;
|
|
428
|
+
}[];
|
|
429
|
+
Agent?: {
|
|
430
|
+
module: string;
|
|
431
|
+
options: {
|
|
432
|
+
[k: string]: unknown;
|
|
433
|
+
};
|
|
434
|
+
[k: string]: unknown;
|
|
435
|
+
}[];
|
|
436
|
+
[k: string]: unknown;
|
|
437
|
+
};
|
|
438
|
+
[k: string]: unknown;
|
|
439
|
+
}
|
|
440
|
+
export interface HttpCacheOptions {
|
|
441
|
+
store?: string;
|
|
442
|
+
/**
|
|
443
|
+
* @minItems 1
|
|
444
|
+
*/
|
|
445
|
+
methods?: [string, ...string[]];
|
|
446
|
+
cacheTagsHeader?: string;
|
|
447
|
+
maxSize?: number;
|
|
448
|
+
maxEntrySize?: number;
|
|
449
|
+
maxCount?: number;
|
|
450
|
+
/**
|
|
451
|
+
* Whitelist of origins to cache. Supports exact strings and regex patterns (e.g., "/https:\\/\\/.*\\.example\\.com/").
|
|
452
|
+
*/
|
|
453
|
+
origins?: string[];
|
|
454
|
+
/**
|
|
455
|
+
* Default cache duration in seconds for responses without explicit expiration headers.
|
|
456
|
+
*/
|
|
457
|
+
cacheByDefault?: number;
|
|
458
|
+
/**
|
|
459
|
+
* Cache type. "shared" caches may be shared between users, "private" caches are user-specific.
|
|
460
|
+
*/
|
|
461
|
+
type?: "shared" | "private";
|
|
462
|
+
[k: string]: unknown;
|
|
463
|
+
}
|
|
464
|
+
export interface ManagementApiOptions {
|
|
465
|
+
logs?: {
|
|
466
|
+
maxSize?: number;
|
|
467
|
+
};
|
|
468
|
+
/**
|
|
469
|
+
* Custom path for the control socket. If not specified, uses the default platform-specific location.
|
|
470
|
+
*/
|
|
471
|
+
socket?: string;
|
|
472
|
+
}
|
|
473
|
+
export interface MetricsOptions {
|
|
474
|
+
port?: number | string;
|
|
475
|
+
enabled?: boolean | string;
|
|
476
|
+
hostname?: string;
|
|
477
|
+
endpoint?: string;
|
|
478
|
+
https?: HttpsOptions1;
|
|
479
|
+
auth?: {
|
|
480
|
+
username: string;
|
|
481
|
+
password: string;
|
|
482
|
+
};
|
|
483
|
+
labels?: {
|
|
484
|
+
[k: string]: string;
|
|
485
|
+
};
|
|
486
|
+
/**
|
|
487
|
+
* The label name to use for the application identifier in metrics (e.g., applicationId, serviceId)
|
|
488
|
+
*/
|
|
489
|
+
applicationLabel?: string;
|
|
490
|
+
/**
|
|
491
|
+
* Enable outgoing HTTP client request duration metrics
|
|
492
|
+
*/
|
|
493
|
+
httpClientMetrics?: boolean | string;
|
|
494
|
+
readiness?:
|
|
495
|
+
| boolean
|
|
496
|
+
| {
|
|
497
|
+
endpoint?: string;
|
|
498
|
+
success?: {
|
|
499
|
+
statusCode?: number;
|
|
500
|
+
body?: string;
|
|
501
|
+
};
|
|
502
|
+
fail?: {
|
|
503
|
+
statusCode?: number;
|
|
504
|
+
body?: string;
|
|
505
|
+
};
|
|
506
|
+
};
|
|
507
|
+
liveness?:
|
|
508
|
+
| boolean
|
|
509
|
+
| {
|
|
510
|
+
endpoint?: string;
|
|
511
|
+
success?: {
|
|
512
|
+
statusCode?: number;
|
|
513
|
+
body?: string;
|
|
514
|
+
};
|
|
515
|
+
fail?: {
|
|
516
|
+
statusCode?: number;
|
|
517
|
+
body?: string;
|
|
518
|
+
};
|
|
519
|
+
};
|
|
520
|
+
/**
|
|
521
|
+
* @deprecated
|
|
522
|
+
* Deprecated. Health probe timeout configuration is no longer used.
|
|
523
|
+
*/
|
|
524
|
+
healthChecksTimeouts?: number | string;
|
|
525
|
+
plugins?: string[];
|
|
526
|
+
timeout?: number | string;
|
|
527
|
+
/**
|
|
528
|
+
* Configuration for exporting metrics to an OTLP endpoint
|
|
529
|
+
*/
|
|
530
|
+
otlpExporter?: {
|
|
531
|
+
/**
|
|
532
|
+
* Enable or disable OTLP metrics export
|
|
533
|
+
*/
|
|
534
|
+
enabled?: boolean | string;
|
|
535
|
+
/**
|
|
536
|
+
* OTLP endpoint URL (e.g., http://collector:4318/v1/metrics)
|
|
537
|
+
*/
|
|
538
|
+
endpoint: string;
|
|
539
|
+
/**
|
|
540
|
+
* Interval in milliseconds between metric pushes
|
|
541
|
+
*/
|
|
542
|
+
interval?: number | string;
|
|
543
|
+
/**
|
|
544
|
+
* Additional HTTP headers for authentication
|
|
545
|
+
*/
|
|
546
|
+
headers?: {
|
|
547
|
+
[k: string]: string;
|
|
548
|
+
};
|
|
549
|
+
/**
|
|
550
|
+
* Service name for OTLP resource attributes
|
|
551
|
+
*/
|
|
552
|
+
serviceName?: string;
|
|
553
|
+
/**
|
|
554
|
+
* Service version for OTLP resource attributes
|
|
555
|
+
*/
|
|
556
|
+
serviceVersion?: string;
|
|
557
|
+
};
|
|
558
|
+
/**
|
|
559
|
+
* Configuration for forwarding user OpenTelemetry metrics to an OTLP endpoint
|
|
560
|
+
*/
|
|
561
|
+
opentelemetry?: {
|
|
562
|
+
/**
|
|
563
|
+
* Enable or disable OpenTelemetry metrics forwarding
|
|
564
|
+
*/
|
|
565
|
+
enabled?: boolean | string;
|
|
566
|
+
/**
|
|
567
|
+
* OTLP metrics endpoint URL (e.g., http://collector:4318/v1/metrics)
|
|
568
|
+
*/
|
|
569
|
+
endpoint: string;
|
|
570
|
+
/**
|
|
571
|
+
* Interval in milliseconds between metric forwards
|
|
572
|
+
*/
|
|
573
|
+
interval?: number | string;
|
|
574
|
+
/**
|
|
575
|
+
* Additional HTTP headers for authentication
|
|
576
|
+
*/
|
|
577
|
+
headers?: {
|
|
578
|
+
[k: string]: string;
|
|
579
|
+
};
|
|
580
|
+
};
|
|
581
|
+
/**
|
|
582
|
+
* Custom labels to add to HTTP metrics (http_request_all_duration_seconds). Each label extracts its value from an HTTP request header.
|
|
583
|
+
*/
|
|
584
|
+
httpCustomLabels?: {
|
|
585
|
+
/**
|
|
586
|
+
* The label name to use in metrics
|
|
587
|
+
*/
|
|
588
|
+
name: string;
|
|
589
|
+
/**
|
|
590
|
+
* The HTTP request header to extract the value from
|
|
591
|
+
*/
|
|
592
|
+
header: string;
|
|
593
|
+
/**
|
|
594
|
+
* Default value when header is missing (defaults to "unknown")
|
|
595
|
+
*/
|
|
596
|
+
default?: string;
|
|
597
|
+
}[];
|
|
598
|
+
}
|
|
599
|
+
export interface HttpsOptions1 {
|
|
600
|
+
allowHTTP1?: boolean;
|
|
601
|
+
key:
|
|
602
|
+
| string
|
|
603
|
+
| {
|
|
604
|
+
path?: string;
|
|
605
|
+
}
|
|
606
|
+
| (
|
|
607
|
+
| string
|
|
608
|
+
| {
|
|
609
|
+
path?: string;
|
|
610
|
+
}
|
|
611
|
+
)[];
|
|
612
|
+
cert:
|
|
613
|
+
| string
|
|
614
|
+
| {
|
|
615
|
+
path?: string;
|
|
616
|
+
}
|
|
617
|
+
| (
|
|
618
|
+
| string
|
|
619
|
+
| {
|
|
620
|
+
path?: string;
|
|
621
|
+
}
|
|
622
|
+
)[];
|
|
623
|
+
requestCert?: boolean;
|
|
624
|
+
rejectUnauthorized?: boolean;
|
|
625
|
+
}
|
|
626
|
+
export interface TelemetryOptions {
|
|
627
|
+
enabled?: boolean | string;
|
|
628
|
+
/**
|
|
629
|
+
* The name of the application. Defaults to the folder name if not specified.
|
|
630
|
+
*/
|
|
631
|
+
applicationName: string;
|
|
632
|
+
/**
|
|
633
|
+
* The version of the application (optional)
|
|
634
|
+
*/
|
|
635
|
+
version?: string;
|
|
636
|
+
/**
|
|
637
|
+
* An array of paths to skip when creating spans. Useful for health checks and other endpoints that do not need to be traced.
|
|
638
|
+
*/
|
|
639
|
+
skip?: {
|
|
640
|
+
/**
|
|
641
|
+
* The path to skip. Can be a string or a regex.
|
|
642
|
+
*/
|
|
643
|
+
path?: string;
|
|
644
|
+
/**
|
|
645
|
+
* HTTP method to skip
|
|
646
|
+
*/
|
|
647
|
+
method?: "GET" | "POST" | "PUT" | "DELETE" | "PATCH" | "HEAD" | "OPTIONS";
|
|
648
|
+
[k: string]: unknown;
|
|
649
|
+
}[];
|
|
650
|
+
exporter?:
|
|
651
|
+
| {
|
|
652
|
+
type?: "console" | "otlp" | "zipkin" | "memory" | "file";
|
|
653
|
+
/**
|
|
654
|
+
* Options for the exporter. These are passed directly to the exporter.
|
|
655
|
+
*/
|
|
656
|
+
options?: {
|
|
657
|
+
/**
|
|
658
|
+
* The URL to send the traces to. Not used for console or memory exporters.
|
|
659
|
+
*/
|
|
660
|
+
url?: string;
|
|
661
|
+
/**
|
|
662
|
+
* Headers to send to the exporter. Not used for console or memory exporters.
|
|
663
|
+
*/
|
|
664
|
+
headers?: {
|
|
665
|
+
[k: string]: unknown;
|
|
666
|
+
};
|
|
667
|
+
/**
|
|
668
|
+
* The path to write the traces to. Only for file exporter.
|
|
669
|
+
*/
|
|
670
|
+
path?: string;
|
|
671
|
+
/**
|
|
672
|
+
* The OTLP transport protocol to use. Only for the otlp exporter. Defaults to http.
|
|
673
|
+
*/
|
|
674
|
+
protocol?: "http" | "grpc";
|
|
675
|
+
/**
|
|
676
|
+
* Alias for protocol. Only for the otlp exporter. Defaults to http.
|
|
677
|
+
*/
|
|
678
|
+
transport?: "http" | "grpc";
|
|
679
|
+
[k: string]: unknown;
|
|
680
|
+
};
|
|
681
|
+
additionalProperties?: never;
|
|
682
|
+
[k: string]: unknown;
|
|
683
|
+
}[]
|
|
684
|
+
| {
|
|
685
|
+
type?: "console" | "otlp" | "zipkin" | "memory" | "file";
|
|
686
|
+
/**
|
|
687
|
+
* Options for the exporter. These are passed directly to the exporter.
|
|
688
|
+
*/
|
|
689
|
+
options?: {
|
|
690
|
+
/**
|
|
691
|
+
* The URL to send the traces to. Not used for console or memory exporters.
|
|
692
|
+
*/
|
|
693
|
+
url?: string;
|
|
694
|
+
/**
|
|
695
|
+
* Headers to send to the exporter. Not used for console or memory exporters.
|
|
696
|
+
*/
|
|
697
|
+
headers?: {
|
|
698
|
+
[k: string]: unknown;
|
|
699
|
+
};
|
|
700
|
+
/**
|
|
701
|
+
* The path to write the traces to. Only for file exporter.
|
|
702
|
+
*/
|
|
703
|
+
path?: string;
|
|
704
|
+
/**
|
|
705
|
+
* The OTLP transport protocol to use. Only for the otlp exporter. Defaults to http.
|
|
706
|
+
*/
|
|
707
|
+
protocol?: "http" | "grpc";
|
|
708
|
+
/**
|
|
709
|
+
* Alias for protocol. Only for the otlp exporter. Defaults to http.
|
|
710
|
+
*/
|
|
711
|
+
transport?: "http" | "grpc";
|
|
712
|
+
[k: string]: unknown;
|
|
713
|
+
};
|
|
714
|
+
additionalProperties?: never;
|
|
715
|
+
[k: string]: unknown;
|
|
716
|
+
};
|
|
717
|
+
/**
|
|
718
|
+
* Enable the OpenTelemetry diagnostic logger. Diagnostic messages are forwarded to the Platformatic global logger using the current logger level.
|
|
719
|
+
*/
|
|
720
|
+
diagLogger?: boolean | string;
|
|
721
|
+
}
|
|
722
|
+
export interface CompileCacheOptions {
|
|
723
|
+
/**
|
|
724
|
+
* Enable Node.js module compile cache for faster startup
|
|
725
|
+
*/
|
|
726
|
+
enabled?: boolean;
|
|
727
|
+
/**
|
|
728
|
+
* Directory to store compile cache. Defaults to .plt/compile-cache in app root
|
|
729
|
+
*/
|
|
730
|
+
directory?: string;
|
|
731
|
+
}
|
|
732
|
+
export interface ApplicationWorkersOptions {
|
|
733
|
+
static?: number;
|
|
734
|
+
minimum?: number;
|
|
735
|
+
maximum?: number;
|
|
736
|
+
scaleUpELU?: number;
|
|
737
|
+
scaleDownELU?: number;
|
|
738
|
+
[k: string]: unknown;
|
|
739
|
+
}
|
|
740
|
+
export interface ApplicationHealthOptions {
|
|
741
|
+
enabled?: boolean | string;
|
|
742
|
+
interval?: number | string;
|
|
743
|
+
gracePeriod?: number | string;
|
|
744
|
+
maxUnhealthyChecks?: number | string;
|
|
745
|
+
maxELU?: number | string;
|
|
746
|
+
maxEventLoopDelay?: number | string;
|
|
747
|
+
maxEventLoopDelayP99?: number | string;
|
|
748
|
+
maxHeapUsed?: number | string;
|
|
749
|
+
maxHeapTotal?: number | string;
|
|
750
|
+
maxYoungGeneration?: number | string;
|
|
751
|
+
codeRangeSize?: number | string;
|
|
752
|
+
bufferPoolSize?: number | string;
|
|
753
|
+
defaultHighWaterMark?: number | string;
|
|
754
|
+
}
|
|
755
|
+
export interface PermissionsOptions {
|
|
756
|
+
fs?: {
|
|
757
|
+
read?: string[];
|
|
758
|
+
write?: string[];
|
|
759
|
+
};
|
|
760
|
+
}
|
|
761
|
+
export interface ApplicationTelemetryOverrides {
|
|
762
|
+
/**
|
|
763
|
+
* An array of instrumentations loaded if tracing is enabled
|
|
764
|
+
*/
|
|
765
|
+
instrumentations?: (
|
|
766
|
+
| string
|
|
767
|
+
| {
|
|
768
|
+
package: string;
|
|
769
|
+
exportName?: string;
|
|
770
|
+
options?: {
|
|
771
|
+
[k: string]: unknown;
|
|
772
|
+
};
|
|
773
|
+
[k: string]: unknown;
|
|
774
|
+
}
|
|
775
|
+
)[];
|
|
776
|
+
[k: string]: unknown;
|
|
777
|
+
}
|
|
778
|
+
export interface CompileCacheOptions1 {
|
|
779
|
+
/**
|
|
780
|
+
* Enable Node.js module compile cache for faster startup
|
|
781
|
+
*/
|
|
782
|
+
enabled?: boolean;
|
|
783
|
+
/**
|
|
784
|
+
* Directory to store compile cache. Defaults to .plt/compile-cache in app root
|
|
785
|
+
*/
|
|
786
|
+
directory?: string;
|
|
787
|
+
}
|