@platformatic/basic 3.38.1 → 3.40.0

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 CHANGED
@@ -78,6 +78,10 @@ export interface PlatformaticBasicConfig {
78
78
  customLevels?: {
79
79
  [k: string]: unknown;
80
80
  };
81
+ openTelemetryExporter?: {
82
+ protocol: "grpc" | "http";
83
+ url: string;
84
+ };
81
85
  [k: string]: unknown;
82
86
  };
83
87
  server?: {
@@ -216,6 +220,12 @@ export interface PlatformaticBasicConfig {
216
220
  */
217
221
  socket?: string;
218
222
  };
223
+ management?:
224
+ | boolean
225
+ | {
226
+ enabled?: boolean;
227
+ operations?: string[];
228
+ };
219
229
  metrics?:
220
230
  | boolean
221
231
  | {
package/lib/capability.js CHANGED
@@ -14,6 +14,7 @@ import {
14
14
  ensureMetricsGroup,
15
15
  setupOtlpExporter
16
16
  } from '@platformatic/metrics'
17
+ import { addPinoInstrumentation } from '@platformatic/telemetry'
17
18
  import { parseCommandString } from 'execa'
18
19
  import { spawn } from 'node:child_process'
19
20
  import { tracingChannel } from 'node:diagnostics_channel'
@@ -709,6 +710,10 @@ export class BaseCapability extends EventEmitter {
709
710
  this.root
710
711
  )
711
712
 
713
+ if (loggerOptions.openTelemetryExporter && this.telemetryConfig?.enabled !== false) {
714
+ addPinoInstrumentation(pinoOptions)
715
+ }
716
+
712
717
  return pino(pinoOptions, this.standardStreams?.stdout)
713
718
  }
714
719
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platformatic/basic",
3
- "version": "3.38.1",
3
+ "version": "3.40.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -25,10 +25,10 @@
25
25
  "split2": "^4.2.0",
26
26
  "undici": "^7.0.0",
27
27
  "ws": "^8.18.0",
28
- "@platformatic/foundation": "3.38.1",
29
- "@platformatic/itc": "3.38.1",
30
- "@platformatic/metrics": "3.38.1",
31
- "@platformatic/telemetry": "3.38.1"
28
+ "@platformatic/foundation": "3.40.0",
29
+ "@platformatic/telemetry": "3.40.0",
30
+ "@platformatic/itc": "3.40.0",
31
+ "@platformatic/metrics": "3.40.0"
32
32
  },
33
33
  "devDependencies": {
34
34
  "cleaner-spec-reporter": "^0.5.0",
package/schema.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://schemas.platformatic.dev/@platformatic/basic/3.38.1.json",
2
+ "$id": "https://schemas.platformatic.dev/@platformatic/basic/3.40.0.json",
3
3
  "$schema": "http://json-schema.org/draft-07/schema#",
4
4
  "title": "Platformatic Basic Config",
5
5
  "type": "object",
@@ -358,6 +358,29 @@
358
358
  "additionalProperties": false
359
359
  }
360
360
  ]
361
+ },
362
+ "management": {
363
+ "anyOf": [
364
+ {
365
+ "type": "boolean"
366
+ },
367
+ {
368
+ "type": "object",
369
+ "properties": {
370
+ "enabled": {
371
+ "type": "boolean",
372
+ "default": true
373
+ },
374
+ "operations": {
375
+ "type": "array",
376
+ "items": {
377
+ "type": "string"
378
+ }
379
+ }
380
+ },
381
+ "additionalProperties": false
382
+ }
383
+ ]
361
384
  }
362
385
  }
363
386
  }
@@ -577,6 +600,26 @@
577
600
  "customLevels": {
578
601
  "type": "object",
579
602
  "additionalProperties": true
603
+ },
604
+ "openTelemetryExporter": {
605
+ "type": "object",
606
+ "properties": {
607
+ "protocol": {
608
+ "type": "string",
609
+ "enum": [
610
+ "grpc",
611
+ "http"
612
+ ]
613
+ },
614
+ "url": {
615
+ "type": "string"
616
+ }
617
+ },
618
+ "required": [
619
+ "protocol",
620
+ "url"
621
+ ],
622
+ "additionalProperties": false
580
623
  }
581
624
  },
582
625
  "default": {},
@@ -1077,6 +1120,29 @@
1077
1120
  ],
1078
1121
  "default": true
1079
1122
  },
1123
+ "management": {
1124
+ "anyOf": [
1125
+ {
1126
+ "type": "boolean"
1127
+ },
1128
+ {
1129
+ "type": "object",
1130
+ "properties": {
1131
+ "enabled": {
1132
+ "type": "boolean",
1133
+ "default": true
1134
+ },
1135
+ "operations": {
1136
+ "type": "array",
1137
+ "items": {
1138
+ "type": "string"
1139
+ }
1140
+ }
1141
+ },
1142
+ "additionalProperties": false
1143
+ }
1144
+ ]
1145
+ },
1080
1146
  "metrics": {
1081
1147
  "anyOf": [
1082
1148
  {