@platformatic/next 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.
Files changed (3) hide show
  1. package/config.d.ts +26 -0
  2. package/package.json +6 -6
  3. package/schema.json +51 -1
package/config.d.ts CHANGED
@@ -870,6 +870,32 @@ export interface PlatformaticNextJsConfig {
870
870
  * Enable the OpenTelemetry diagnostic logger. Diagnostic messages are forwarded to the Platformatic global logger using the current logger level.
871
871
  */
872
872
  diagLogger?: boolean | string;
873
+ /**
874
+ * 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.
875
+ */
876
+ sampler?:
877
+ | {
878
+ type:
879
+ | "always_on"
880
+ | "always_off"
881
+ | "traceidratio"
882
+ | "parentbased_always_on"
883
+ | "parentbased_always_off"
884
+ | "parentbased_traceidratio";
885
+ /**
886
+ * Options for the sampler, for instance { "ratio": 0.1 } for the ratio based ones.
887
+ */
888
+ options?: {
889
+ [k: string]: unknown;
890
+ };
891
+ }
892
+ | {
893
+ package: string;
894
+ exportName?: string;
895
+ options?: {
896
+ [k: string]: unknown;
897
+ };
898
+ };
873
899
  };
874
900
  verticalScaler?: {
875
901
  enabled?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platformatic/next",
3
- "version": "3.75.0",
3
+ "version": "3.75.1",
4
4
  "description": "Platformatic Next.js Capability",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -19,9 +19,9 @@
19
19
  "@babel/parser": "^7.25.3",
20
20
  "@babel/traverse": "^7.25.3",
21
21
  "@babel/types": "^7.25.2",
22
- "@platformatic/basic": "3.75.0",
23
- "@platformatic/foundation": "3.75.0",
24
- "@platformatic/globals": "3.75.0",
22
+ "@platformatic/basic": "3.75.1",
23
+ "@platformatic/foundation": "3.75.1",
24
+ "@platformatic/globals": "3.75.1",
25
25
  "@platformatic/image-optimizer": "^0.2.1",
26
26
  "amaro": "^1.0.0",
27
27
  "iovalkey": "^0.4.0",
@@ -31,8 +31,8 @@
31
31
  },
32
32
  "devDependencies": {
33
33
  "@fastify/reply-from": "^12.0.0",
34
- "@platformatic/gateway": "3.75.0",
35
- "@platformatic/service": "3.75.0",
34
+ "@platformatic/gateway": "3.75.1",
35
+ "@platformatic/service": "3.75.1",
36
36
  "@types/node": "^22.5.0",
37
37
  "@types/react": "^19.1.11",
38
38
  "@types/react-dom": "^19.1.7",
package/schema.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "$id": "https://schemas.platformatic.dev/@platformatic/next/3.75.0.json",
2
+ "$id": "https://schemas.platformatic.dev/@platformatic/next/3.75.1.json",
3
3
  "$schema": "http://json-schema.org/draft-07/schema#",
4
4
  "title": "Platformatic Next.js Config",
5
5
  "type": "object",
@@ -2600,6 +2600,56 @@
2600
2600
  }
2601
2601
  ],
2602
2602
  "description": "Enable the OpenTelemetry diagnostic logger. Diagnostic messages are forwarded to the Platformatic global logger using the current logger level."
2603
+ },
2604
+ "sampler": {
2605
+ "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.",
2606
+ "anyOf": [
2607
+ {
2608
+ "type": "object",
2609
+ "properties": {
2610
+ "type": {
2611
+ "type": "string",
2612
+ "enum": [
2613
+ "always_on",
2614
+ "always_off",
2615
+ "traceidratio",
2616
+ "parentbased_always_on",
2617
+ "parentbased_always_off",
2618
+ "parentbased_traceidratio"
2619
+ ]
2620
+ },
2621
+ "options": {
2622
+ "type": "object",
2623
+ "description": "Options for the sampler, for instance { \"ratio\": 0.1 } for the ratio based ones.",
2624
+ "additionalProperties": true
2625
+ }
2626
+ },
2627
+ "required": [
2628
+ "type"
2629
+ ],
2630
+ "additionalProperties": false
2631
+ },
2632
+ {
2633
+ "type": "object",
2634
+ "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.",
2635
+ "properties": {
2636
+ "package": {
2637
+ "type": "string"
2638
+ },
2639
+ "exportName": {
2640
+ "type": "string"
2641
+ },
2642
+ "options": {
2643
+ "type": "object",
2644
+ "additionalProperties": true
2645
+ }
2646
+ },
2647
+ "required": [
2648
+ "package"
2649
+ ],
2650
+ "additionalProperties": false
2651
+ }
2652
+ ]
2603
2653
  }
2604
2654
  },
2605
2655
  "required": [