@platformatic/db 3.33.0 → 3.34.1-alpha.3

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 +21 -0
  2. package/package.json +12 -12
  3. package/schema.json +32 -1
package/config.d.ts CHANGED
@@ -593,6 +593,10 @@ export interface PlatformaticDatabaseConfig {
593
593
  gracefulShutdown?: {
594
594
  runtime: number | string;
595
595
  application: number | string;
596
+ /**
597
+ * Add Connection: close header to HTTP responses during graceful shutdown
598
+ */
599
+ closeConnections?: boolean;
596
600
  };
597
601
  health?: {
598
602
  enabled?: boolean | string;
@@ -756,6 +760,23 @@ export interface PlatformaticDatabaseConfig {
756
760
  */
757
761
  serviceVersion?: string;
758
762
  };
763
+ /**
764
+ * Custom labels to add to HTTP metrics (http_request_all_duration_seconds). Each label extracts its value from an HTTP request header.
765
+ */
766
+ httpCustomLabels?: {
767
+ /**
768
+ * The label name to use in metrics
769
+ */
770
+ name: string;
771
+ /**
772
+ * The HTTP request header to extract the value from
773
+ */
774
+ header: string;
775
+ /**
776
+ * Default value when header is missing (defaults to "unknown")
777
+ */
778
+ default?: string;
779
+ }[];
759
780
  };
760
781
  telemetry?: {
761
782
  enabled?: boolean | string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platformatic/db",
3
- "version": "3.33.0",
3
+ "version": "3.34.1-alpha.3",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -66,17 +66,17 @@
66
66
  "rfdc": "^1.3.1",
67
67
  "rimraf": "^4.4.1",
68
68
  "semgrator": "^0.3.0",
69
- "@platformatic/basic": "3.33.0",
70
- "@platformatic/foundation": "3.33.0",
71
- "@platformatic/db-authorization": "3.33.0",
72
- "@platformatic/db-core": "3.33.0",
73
- "@platformatic/sql-events": "3.33.0",
74
- "@platformatic/service": "3.33.0",
75
- "@platformatic/sql-graphql": "3.33.0",
76
- "@platformatic/sql-json-schema-mapper": "3.33.0",
77
- "@platformatic/sql-mapper": "3.33.0",
78
- "@platformatic/sql-openapi": "3.33.0",
79
- "@platformatic/telemetry": "3.33.0"
69
+ "@platformatic/basic": "3.34.1-alpha.3",
70
+ "@platformatic/db-core": "3.34.1-alpha.3",
71
+ "@platformatic/db-authorization": "3.34.1-alpha.3",
72
+ "@platformatic/foundation": "3.34.1-alpha.3",
73
+ "@platformatic/service": "3.34.1-alpha.3",
74
+ "@platformatic/sql-events": "3.34.1-alpha.3",
75
+ "@platformatic/sql-graphql": "3.34.1-alpha.3",
76
+ "@platformatic/sql-mapper": "3.34.1-alpha.3",
77
+ "@platformatic/sql-json-schema-mapper": "3.34.1-alpha.3",
78
+ "@platformatic/sql-openapi": "3.34.1-alpha.3",
79
+ "@platformatic/telemetry": "3.34.1-alpha.3"
80
80
  },
81
81
  "engines": {
82
82
  "node": ">=22.19.0"
package/schema.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://schemas.platformatic.dev/@platformatic/db/3.33.0.json",
2
+ "$id": "https://schemas.platformatic.dev/@platformatic/db/3.34.1-alpha.3.json",
3
3
  "$schema": "http://json-schema.org/draft-07/schema#",
4
4
  "title": "Platformatic Database Config",
5
5
  "type": "object",
@@ -2046,6 +2046,11 @@
2046
2046
  }
2047
2047
  ],
2048
2048
  "default": 10000
2049
+ },
2050
+ "closeConnections": {
2051
+ "type": "boolean",
2052
+ "default": true,
2053
+ "description": "Add Connection: close header to HTTP responses during graceful shutdown"
2049
2054
  }
2050
2055
  },
2051
2056
  "default": {},
@@ -2586,6 +2591,32 @@
2586
2591
  "endpoint"
2587
2592
  ],
2588
2593
  "additionalProperties": false
2594
+ },
2595
+ "httpCustomLabels": {
2596
+ "type": "array",
2597
+ "description": "Custom labels to add to HTTP metrics (http_request_all_duration_seconds). Each label extracts its value from an HTTP request header.",
2598
+ "items": {
2599
+ "type": "object",
2600
+ "properties": {
2601
+ "name": {
2602
+ "type": "string",
2603
+ "description": "The label name to use in metrics"
2604
+ },
2605
+ "header": {
2606
+ "type": "string",
2607
+ "description": "The HTTP request header to extract the value from"
2608
+ },
2609
+ "default": {
2610
+ "type": "string",
2611
+ "description": "Default value when header is missing (defaults to \"unknown\")"
2612
+ }
2613
+ },
2614
+ "required": [
2615
+ "name",
2616
+ "header"
2617
+ ],
2618
+ "additionalProperties": false
2619
+ }
2589
2620
  }
2590
2621
  },
2591
2622
  "additionalProperties": false