@platformatic/telemetry 2.65.0 → 2.66.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 (2) hide show
  1. package/lib/schema.js +2 -85
  2. package/package.json +3 -2
package/lib/schema.js CHANGED
@@ -1,87 +1,4 @@
1
1
  'use strict'
2
2
 
3
- const ExporterSchema = {
4
- type: 'object',
5
- properties: {
6
- type: {
7
- type: 'string',
8
- enum: ['console', 'otlp', 'zipkin', 'memory', 'file'],
9
- default: 'console',
10
- },
11
- options: {
12
- type: 'object',
13
- description: 'Options for the exporter. These are passed directly to the exporter.',
14
- properties: {
15
- url: {
16
- type: 'string',
17
- description: 'The URL to send the traces to. Not used for console or memory exporters.',
18
- },
19
- headers: {
20
- type: 'object',
21
- description: 'Headers to send to the exporter. Not used for console or memory exporters.',
22
- },
23
- path: {
24
- type: 'string',
25
- description: 'The path to write the traces to. Only for file exporter.'
26
- }
27
- },
28
- },
29
- additionalProperties: false,
30
- },
31
- }
32
-
33
- const TelemetrySchema = {
34
- $id: '/OpenTelemetry',
35
- type: 'object',
36
- properties: {
37
- enabled: {
38
- anyOf: [
39
- {
40
- type: 'boolean'
41
- },
42
- {
43
- type: 'string'
44
- }
45
- ]
46
- },
47
- serviceName: {
48
- type: 'string',
49
- description: 'The name of the service. Defaults to the folder name if not specified.',
50
- },
51
- version: {
52
- type: 'string',
53
- description: 'The version of the service (optional)',
54
- },
55
- skip: {
56
- type: 'array',
57
- description: 'An array of paths to skip when creating spans. Useful for health checks and other endpoints that do not need to be traced.',
58
- items: {
59
- type: 'object',
60
- properties: {
61
- path: {
62
- type: 'string',
63
- description: 'The path to skip. Can be a string or a regex.',
64
- },
65
- method: {
66
- description: 'HTTP method to skip',
67
- type: 'string',
68
- enum: ['GET', 'POST', 'PUT', 'DELETE', 'PATCH', 'HEAD', 'OPTIONS'],
69
- },
70
- },
71
- },
72
- },
73
- exporter: {
74
- anyOf: [
75
- {
76
- type: 'array',
77
- items: ExporterSchema,
78
- },
79
- ExporterSchema,
80
- ],
81
- },
82
- },
83
- required: ['serviceName'],
84
- additionalProperties: false,
85
- }
86
-
87
- module.exports = TelemetrySchema
3
+ const { schemaComponents } = require('@platformatic/utils')
4
+ module.exports = schemaComponents.telemetry
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platformatic/telemetry",
3
- "version": "2.65.0",
3
+ "version": "2.66.0",
4
4
  "description": "OpenTelemetry integration for Platformatic",
5
5
  "main": "index.js",
6
6
  "author": "Platformatic Inc. <oss@platformatic.dev> (https://platformatic.dev)",
@@ -36,7 +36,8 @@
36
36
  "abstract-logging": "^2.0.1",
37
37
  "fast-uri": "^3.0.0",
38
38
  "fastify-plugin": "^5.0.0",
39
- "@platformatic/config": "2.65.0"
39
+ "@platformatic/config": "2.66.0",
40
+ "@platformatic/utils": "2.66.0"
40
41
  },
41
42
  "scripts": {
42
43
  "test": "npm run lint && borp --timeout=120000 --concurrency=1",