@platformatic/nitro 3.75.0 → 3.75.1

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
@@ -869,6 +869,32 @@ export interface PlatformaticNitroConfig {
869
869
  * Enable the OpenTelemetry diagnostic logger. Diagnostic messages are forwarded to the Platformatic global logger using the current logger level.
870
870
  */
871
871
  diagLogger?: boolean | string;
872
+ /**
873
+ * How much to trace. Omitted, everything is recorded. Either a type out of the set OpenTelemetry defines for OTEL_TRACES_SAMPLER, or a package exporting a sampler.
874
+ */
875
+ sampler?:
876
+ | {
877
+ type:
878
+ | "always_on"
879
+ | "always_off"
880
+ | "traceidratio"
881
+ | "parentbased_always_on"
882
+ | "parentbased_always_off"
883
+ | "parentbased_traceidratio";
884
+ /**
885
+ * Options for the sampler, for instance { "ratio": 0.1 } for the ratio based ones.
886
+ */
887
+ options?: {
888
+ [k: string]: unknown;
889
+ };
890
+ }
891
+ | {
892
+ package: string;
893
+ exportName?: string;
894
+ options?: {
895
+ [k: string]: unknown;
896
+ };
897
+ };
872
898
  };
873
899
  verticalScaler?: {
874
900
  enabled?: boolean;
package/lib/schema.js CHANGED
@@ -32,6 +32,7 @@ delete server.properties.http2
32
32
  const vite = structuredClone(viteSchemaComponents.vite)
33
33
  delete vite.properties.ssr
34
34
  delete vite.properties.notFoundHandler
35
+ delete vite.properties.preCompressed
35
36
 
36
37
  export const schemaComponents = { nitro, vite }
37
38
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platformatic/nitro",
3
- "version": "3.75.0",
3
+ "version": "3.75.1",
4
4
  "description": "Platformatic Nitro Capability",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -29,16 +29,16 @@
29
29
  },
30
30
  "homepage": "https://github.com/platformatic/platformatic#readme",
31
31
  "dependencies": {
32
- "@platformatic/basic": "3.75.0",
33
- "@platformatic/foundation": "3.75.0",
34
- "@platformatic/globals": "3.75.0",
35
- "@platformatic/vite": "3.75.0",
32
+ "@platformatic/basic": "3.75.1",
33
+ "@platformatic/foundation": "3.75.1",
34
+ "@platformatic/globals": "3.75.1",
35
+ "@platformatic/vite": "3.75.1",
36
36
  "light-my-request": "^6.6.0",
37
37
  "semver": "^7.6.3"
38
38
  },
39
39
  "devDependencies": {
40
- "@platformatic/gateway": "3.75.0",
41
- "@platformatic/service": "3.75.0",
40
+ "@platformatic/gateway": "3.75.1",
41
+ "@platformatic/service": "3.75.1",
42
42
  "cleaner-spec-reporter": "^2.0.0",
43
43
  "eslint": "9",
44
44
  "json-schema-to-typescript": "^16.0.0",
package/schema.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://schemas.platformatic.dev/@platformatic/nitro/3.75.0.json",
2
+ "$id": "https://schemas.platformatic.dev/@platformatic/nitro/3.75.1.json",
3
3
  "$schema": "http://json-schema.org/draft-07/schema#",
4
4
  "title": "Platformatic Nitro Config",
5
5
  "type": "object",
@@ -2594,6 +2594,56 @@
2594
2594
  }
2595
2595
  ],
2596
2596
  "description": "Enable the OpenTelemetry diagnostic logger. Diagnostic messages are forwarded to the Platformatic global logger using the current logger level."
2597
+ },
2598
+ "sampler": {
2599
+ "description": "How much to trace. Omitted, everything is recorded. Either a type out of the set OpenTelemetry defines for OTEL_TRACES_SAMPLER, or a package exporting a sampler.",
2600
+ "anyOf": [
2601
+ {
2602
+ "type": "object",
2603
+ "properties": {
2604
+ "type": {
2605
+ "type": "string",
2606
+ "enum": [
2607
+ "always_on",
2608
+ "always_off",
2609
+ "traceidratio",
2610
+ "parentbased_always_on",
2611
+ "parentbased_always_off",
2612
+ "parentbased_traceidratio"
2613
+ ]
2614
+ },
2615
+ "options": {
2616
+ "type": "object",
2617
+ "description": "Options for the sampler, for instance { \"ratio\": 0.1 } for the ratio based ones.",
2618
+ "additionalProperties": true
2619
+ }
2620
+ },
2621
+ "required": [
2622
+ "type"
2623
+ ],
2624
+ "additionalProperties": false
2625
+ },
2626
+ {
2627
+ "type": "object",
2628
+ "description": "A module exporting a sampler, or a factory which receives the options and returns one. A relative path is resolved against the application directory.",
2629
+ "properties": {
2630
+ "package": {
2631
+ "type": "string"
2632
+ },
2633
+ "exportName": {
2634
+ "type": "string"
2635
+ },
2636
+ "options": {
2637
+ "type": "object",
2638
+ "additionalProperties": true
2639
+ }
2640
+ },
2641
+ "required": [
2642
+ "package"
2643
+ ],
2644
+ "additionalProperties": false
2645
+ }
2646
+ ]
2597
2647
  }
2598
2648
  },
2599
2649
  "required": [