@platformatic/composer 3.13.1 → 3.14.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.
Files changed (3) hide show
  1. package/config.d.ts +31 -0
  2. package/package.json +3 -3
  3. package/schema.json +126 -16
package/config.d.ts CHANGED
@@ -386,6 +386,37 @@ export interface PlatformaticComposerConfig {
386
386
  };
387
387
  plugins?: string[];
388
388
  timeout?: number | string;
389
+ /**
390
+ * Configuration for exporting metrics to an OTLP endpoint
391
+ */
392
+ otlpExporter?: {
393
+ /**
394
+ * Enable or disable OTLP metrics export
395
+ */
396
+ enabled?: boolean | string;
397
+ /**
398
+ * OTLP endpoint URL (e.g., http://collector:4318/v1/metrics)
399
+ */
400
+ endpoint: string;
401
+ /**
402
+ * Interval in milliseconds between metric pushes
403
+ */
404
+ interval?: number | string;
405
+ /**
406
+ * Additional HTTP headers for authentication
407
+ */
408
+ headers?: {
409
+ [k: string]: string;
410
+ };
411
+ /**
412
+ * Service name for OTLP resource attributes
413
+ */
414
+ serviceName?: string;
415
+ /**
416
+ * Service version for OTLP resource attributes
417
+ */
418
+ serviceVersion?: string;
419
+ };
389
420
  };
390
421
  telemetry?: {
391
422
  enabled?: boolean | string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platformatic/composer",
3
- "version": "3.13.1",
3
+ "version": "3.14.0",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -23,8 +23,8 @@
23
23
  "json-schema-to-typescript": "^15.0.0"
24
24
  },
25
25
  "dependencies": {
26
- "@platformatic/foundation": "3.13.1",
27
- "@platformatic/gateway": "3.13.1"
26
+ "@platformatic/foundation": "3.14.0",
27
+ "@platformatic/gateway": "3.14.0"
28
28
  },
29
29
  "engines": {
30
30
  "node": ">=22.19.0"
package/schema.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://schemas.platformatic.dev/@platformatic/composer/3.13.1.json",
2
+ "$id": "https://schemas.platformatic.dev/@platformatic/composer/3.14.0.json",
3
3
  "$schema": "http://json-schema.org/draft-07/schema#",
4
4
  "title": "Platformatic Composer Config",
5
5
  "type": "object",
@@ -731,11 +731,27 @@
731
731
  "workers": {
732
732
  "anyOf": [
733
733
  {
734
- "type": "number",
735
- "minimum": 1
734
+ "type": "number"
736
735
  },
737
736
  {
738
737
  "type": "string"
738
+ },
739
+ {
740
+ "type": "object",
741
+ "properties": {
742
+ "static": {
743
+ "type": "number",
744
+ "minimum": 1
745
+ },
746
+ "minimum": {
747
+ "type": "number",
748
+ "minimum": 1
749
+ },
750
+ "maximum": {
751
+ "type": "number",
752
+ "minimum": 0
753
+ }
754
+ }
739
755
  }
740
756
  ]
741
757
  },
@@ -956,6 +972,43 @@
956
972
  },
957
973
  {
958
974
  "type": "string"
975
+ },
976
+ {
977
+ "type": "object",
978
+ "properties": {
979
+ "static": {
980
+ "type": "number",
981
+ "minimum": 1
982
+ },
983
+ "dynamic": {
984
+ "type": "boolean",
985
+ "default": false
986
+ },
987
+ "minimum": {
988
+ "type": "number",
989
+ "minimum": 1
990
+ },
991
+ "maximum": {
992
+ "type": "number",
993
+ "minimum": 0
994
+ },
995
+ "total": {
996
+ "type": "number",
997
+ "minimum": 1
998
+ },
999
+ "maxMemory": {
1000
+ "type": "number",
1001
+ "minimum": 0
1002
+ },
1003
+ "cooldown": {
1004
+ "type": "number",
1005
+ "minimum": 0
1006
+ },
1007
+ "gracePeriod": {
1008
+ "type": "number",
1009
+ "minimum": 0
1010
+ }
1011
+ }
959
1012
  }
960
1013
  ]
961
1014
  },
@@ -1732,6 +1785,58 @@
1732
1785
  }
1733
1786
  ],
1734
1787
  "default": 10000
1788
+ },
1789
+ "otlpExporter": {
1790
+ "type": "object",
1791
+ "description": "Configuration for exporting metrics to an OTLP endpoint",
1792
+ "properties": {
1793
+ "enabled": {
1794
+ "anyOf": [
1795
+ {
1796
+ "type": "boolean"
1797
+ },
1798
+ {
1799
+ "type": "string"
1800
+ }
1801
+ ],
1802
+ "description": "Enable or disable OTLP metrics export"
1803
+ },
1804
+ "endpoint": {
1805
+ "type": "string",
1806
+ "description": "OTLP endpoint URL (e.g., http://collector:4318/v1/metrics)"
1807
+ },
1808
+ "interval": {
1809
+ "anyOf": [
1810
+ {
1811
+ "type": "integer"
1812
+ },
1813
+ {
1814
+ "type": "string"
1815
+ }
1816
+ ],
1817
+ "default": 60000,
1818
+ "description": "Interval in milliseconds between metric pushes"
1819
+ },
1820
+ "headers": {
1821
+ "type": "object",
1822
+ "additionalProperties": {
1823
+ "type": "string"
1824
+ },
1825
+ "description": "Additional HTTP headers for authentication"
1826
+ },
1827
+ "serviceName": {
1828
+ "type": "string",
1829
+ "description": "Service name for OTLP resource attributes"
1830
+ },
1831
+ "serviceVersion": {
1832
+ "type": "string",
1833
+ "description": "Service version for OTLP resource attributes"
1834
+ }
1835
+ },
1836
+ "required": [
1837
+ "endpoint"
1838
+ ],
1839
+ "additionalProperties": false
1735
1840
  }
1736
1841
  },
1737
1842
  "additionalProperties": false
@@ -1891,35 +1996,40 @@
1891
1996
  "type": "number",
1892
1997
  "minimum": 1
1893
1998
  },
1999
+ "cooldownSec": {
2000
+ "type": "number",
2001
+ "minimum": 0
2002
+ },
2003
+ "gracePeriod": {
2004
+ "type": "number",
2005
+ "minimum": 0
2006
+ },
1894
2007
  "scaleUpELU": {
1895
2008
  "type": "number",
1896
2009
  "minimum": 0,
1897
- "maximum": 1
2010
+ "maximum": 1,
2011
+ "deprecated": true
1898
2012
  },
1899
2013
  "scaleDownELU": {
1900
2014
  "type": "number",
1901
2015
  "minimum": 0,
1902
- "maximum": 1
2016
+ "maximum": 1,
2017
+ "deprecated": true
1903
2018
  },
1904
2019
  "timeWindowSec": {
1905
2020
  "type": "number",
1906
- "minimum": 0
2021
+ "minimum": 0,
2022
+ "deprecated": true
1907
2023
  },
1908
2024
  "scaleDownTimeWindowSec": {
1909
2025
  "type": "number",
1910
- "minimum": 0
1911
- },
1912
- "cooldownSec": {
1913
- "type": "number",
1914
- "minimum": 0
2026
+ "minimum": 0,
2027
+ "deprecated": true
1915
2028
  },
1916
2029
  "scaleIntervalSec": {
1917
2030
  "type": "number",
1918
- "minimum": 0
1919
- },
1920
- "gracePeriod": {
1921
- "type": "number",
1922
- "minimum": 0
2031
+ "minimum": 0,
2032
+ "deprecated": true
1923
2033
  }
1924
2034
  },
1925
2035
  "additionalProperties": false