@bsb/observable-opentelemetry 9.0.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.
- package/LICENSE +665 -0
- package/README.md +58 -0
- package/lib/index.d.ts +27 -0
- package/lib/index.js +43 -0
- package/lib/plugins/observable-opentelemetry/index.d.ts +134 -0
- package/lib/plugins/observable-opentelemetry/index.js +401 -0
- package/lib/schemas/observable-opentelemetry.json +124 -0
- package/lib/schemas/observable-opentelemetry.plugin.json +117 -0
- package/package.json +69 -0
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
{
|
|
2
|
+
"pluginName": "observable-opentelemetry",
|
|
3
|
+
"version": "9.0.0",
|
|
4
|
+
"events": {},
|
|
5
|
+
"configSchema": {
|
|
6
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"properties": {
|
|
9
|
+
"serviceName": {
|
|
10
|
+
"default": "bsb-service",
|
|
11
|
+
"type": "string"
|
|
12
|
+
},
|
|
13
|
+
"serviceVersion": {
|
|
14
|
+
"type": "string"
|
|
15
|
+
},
|
|
16
|
+
"endpoint": {
|
|
17
|
+
"default": "http://localhost:4318",
|
|
18
|
+
"type": "string",
|
|
19
|
+
"format": "uri"
|
|
20
|
+
},
|
|
21
|
+
"export": {
|
|
22
|
+
"type": "object",
|
|
23
|
+
"properties": {
|
|
24
|
+
"protocol": {
|
|
25
|
+
"default": "http",
|
|
26
|
+
"type": "string",
|
|
27
|
+
"enum": [
|
|
28
|
+
"http",
|
|
29
|
+
"grpc"
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
"interval": {
|
|
33
|
+
"default": 5000,
|
|
34
|
+
"type": "integer",
|
|
35
|
+
"minimum": 100,
|
|
36
|
+
"maximum": 9007199254740991
|
|
37
|
+
},
|
|
38
|
+
"maxBatchSize": {
|
|
39
|
+
"default": 512,
|
|
40
|
+
"type": "integer",
|
|
41
|
+
"minimum": 1,
|
|
42
|
+
"maximum": 9007199254740991
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"required": [
|
|
46
|
+
"protocol",
|
|
47
|
+
"interval",
|
|
48
|
+
"maxBatchSize"
|
|
49
|
+
],
|
|
50
|
+
"additionalProperties": false
|
|
51
|
+
},
|
|
52
|
+
"enabled": {
|
|
53
|
+
"type": "object",
|
|
54
|
+
"properties": {
|
|
55
|
+
"traces": {
|
|
56
|
+
"default": true,
|
|
57
|
+
"type": "boolean"
|
|
58
|
+
},
|
|
59
|
+
"metrics": {
|
|
60
|
+
"default": true,
|
|
61
|
+
"type": "boolean"
|
|
62
|
+
},
|
|
63
|
+
"logs": {
|
|
64
|
+
"default": true,
|
|
65
|
+
"type": "boolean"
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"required": [
|
|
69
|
+
"traces",
|
|
70
|
+
"metrics",
|
|
71
|
+
"logs"
|
|
72
|
+
],
|
|
73
|
+
"additionalProperties": false
|
|
74
|
+
},
|
|
75
|
+
"resourceAttributes": {
|
|
76
|
+
"default": {},
|
|
77
|
+
"type": "object",
|
|
78
|
+
"propertyNames": {
|
|
79
|
+
"type": "string"
|
|
80
|
+
},
|
|
81
|
+
"additionalProperties": {
|
|
82
|
+
"type": "string"
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
"samplingRate": {
|
|
86
|
+
"default": 1,
|
|
87
|
+
"type": "number",
|
|
88
|
+
"minimum": 0,
|
|
89
|
+
"maximum": 1
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
"required": [
|
|
93
|
+
"serviceName",
|
|
94
|
+
"endpoint",
|
|
95
|
+
"export",
|
|
96
|
+
"enabled",
|
|
97
|
+
"resourceAttributes",
|
|
98
|
+
"samplingRate"
|
|
99
|
+
],
|
|
100
|
+
"additionalProperties": false
|
|
101
|
+
},
|
|
102
|
+
"pluginType": "observable",
|
|
103
|
+
"capabilities": {
|
|
104
|
+
"logging": {
|
|
105
|
+
"debug": true,
|
|
106
|
+
"info": true,
|
|
107
|
+
"warn": true,
|
|
108
|
+
"error": true
|
|
109
|
+
},
|
|
110
|
+
"metrics": {
|
|
111
|
+
"createCounter": true,
|
|
112
|
+
"createGauge": true,
|
|
113
|
+
"createHistogram": true,
|
|
114
|
+
"incrementCounter": true,
|
|
115
|
+
"setGauge": true,
|
|
116
|
+
"observeHistogram": true
|
|
117
|
+
},
|
|
118
|
+
"tracing": {
|
|
119
|
+
"spanStart": true,
|
|
120
|
+
"spanEnd": true,
|
|
121
|
+
"spanError": true
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "observable-opentelemetry",
|
|
3
|
+
"name": "observable-opentelemetry",
|
|
4
|
+
"version": "9.0.0",
|
|
5
|
+
"description": "OpenTelemetry integration for logs, metrics, and traces via OTLP",
|
|
6
|
+
"category": "observable",
|
|
7
|
+
"tags": [
|
|
8
|
+
"opentelemetry",
|
|
9
|
+
"otlp",
|
|
10
|
+
"observability",
|
|
11
|
+
"logs",
|
|
12
|
+
"metrics",
|
|
13
|
+
"traces"
|
|
14
|
+
],
|
|
15
|
+
"documentation": [
|
|
16
|
+
"./docs/plugin.md"
|
|
17
|
+
],
|
|
18
|
+
"dependencies": [],
|
|
19
|
+
"image": "./observable-opentelemetry.png",
|
|
20
|
+
"configSchema": {
|
|
21
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
22
|
+
"type": "object",
|
|
23
|
+
"properties": {
|
|
24
|
+
"serviceName": {
|
|
25
|
+
"default": "bsb-service",
|
|
26
|
+
"type": "string"
|
|
27
|
+
},
|
|
28
|
+
"serviceVersion": {
|
|
29
|
+
"type": "string"
|
|
30
|
+
},
|
|
31
|
+
"endpoint": {
|
|
32
|
+
"default": "http://localhost:4318",
|
|
33
|
+
"type": "string",
|
|
34
|
+
"format": "uri"
|
|
35
|
+
},
|
|
36
|
+
"export": {
|
|
37
|
+
"type": "object",
|
|
38
|
+
"properties": {
|
|
39
|
+
"protocol": {
|
|
40
|
+
"default": "http",
|
|
41
|
+
"type": "string",
|
|
42
|
+
"enum": [
|
|
43
|
+
"http",
|
|
44
|
+
"grpc"
|
|
45
|
+
]
|
|
46
|
+
},
|
|
47
|
+
"interval": {
|
|
48
|
+
"default": 5000,
|
|
49
|
+
"type": "integer",
|
|
50
|
+
"minimum": 100,
|
|
51
|
+
"maximum": 9007199254740991
|
|
52
|
+
},
|
|
53
|
+
"maxBatchSize": {
|
|
54
|
+
"default": 512,
|
|
55
|
+
"type": "integer",
|
|
56
|
+
"minimum": 1,
|
|
57
|
+
"maximum": 9007199254740991
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"required": [
|
|
61
|
+
"protocol",
|
|
62
|
+
"interval",
|
|
63
|
+
"maxBatchSize"
|
|
64
|
+
],
|
|
65
|
+
"additionalProperties": false
|
|
66
|
+
},
|
|
67
|
+
"enabled": {
|
|
68
|
+
"type": "object",
|
|
69
|
+
"properties": {
|
|
70
|
+
"traces": {
|
|
71
|
+
"default": true,
|
|
72
|
+
"type": "boolean"
|
|
73
|
+
},
|
|
74
|
+
"metrics": {
|
|
75
|
+
"default": true,
|
|
76
|
+
"type": "boolean"
|
|
77
|
+
},
|
|
78
|
+
"logs": {
|
|
79
|
+
"default": true,
|
|
80
|
+
"type": "boolean"
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
"required": [
|
|
84
|
+
"traces",
|
|
85
|
+
"metrics",
|
|
86
|
+
"logs"
|
|
87
|
+
],
|
|
88
|
+
"additionalProperties": false
|
|
89
|
+
},
|
|
90
|
+
"resourceAttributes": {
|
|
91
|
+
"default": {},
|
|
92
|
+
"type": "object",
|
|
93
|
+
"propertyNames": {
|
|
94
|
+
"type": "string"
|
|
95
|
+
},
|
|
96
|
+
"additionalProperties": {
|
|
97
|
+
"type": "string"
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
"samplingRate": {
|
|
101
|
+
"default": 1,
|
|
102
|
+
"type": "number",
|
|
103
|
+
"minimum": 0,
|
|
104
|
+
"maximum": 1
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
"required": [
|
|
108
|
+
"serviceName",
|
|
109
|
+
"endpoint",
|
|
110
|
+
"export",
|
|
111
|
+
"enabled",
|
|
112
|
+
"resourceAttributes",
|
|
113
|
+
"samplingRate"
|
|
114
|
+
],
|
|
115
|
+
"additionalProperties": false
|
|
116
|
+
}
|
|
117
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@bsb/observable-opentelemetry",
|
|
3
|
+
"version": "9.0.0",
|
|
4
|
+
"license": "(AGPL-3.0-only OR Commercial)",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "BetterCorp (PTY) Ltd",
|
|
7
|
+
"email": "nick@bettercorp.dev",
|
|
8
|
+
"url": "https://bettercorp.dev/"
|
|
9
|
+
},
|
|
10
|
+
"description": "OpenTelemetry observable plugin for BSB with OTLP export for traces, metrics, and logs",
|
|
11
|
+
"keywords": [
|
|
12
|
+
"bsb",
|
|
13
|
+
"observable",
|
|
14
|
+
"opentelemetry",
|
|
15
|
+
"otlp",
|
|
16
|
+
"tracing",
|
|
17
|
+
"metrics"
|
|
18
|
+
],
|
|
19
|
+
"repository": {
|
|
20
|
+
"type": "git",
|
|
21
|
+
"url": "https://github.com/BetterCorp/better-service-base.git",
|
|
22
|
+
"directory": "plugins/nodejs/observable-opentelemetry"
|
|
23
|
+
},
|
|
24
|
+
"main": "lib/index.js",
|
|
25
|
+
"types": "lib/index.d.ts",
|
|
26
|
+
"files": [
|
|
27
|
+
"lib/**/*",
|
|
28
|
+
"README.md",
|
|
29
|
+
"LICENSE"
|
|
30
|
+
],
|
|
31
|
+
"scripts": {
|
|
32
|
+
"clean": "bsb-plugin-cli clean",
|
|
33
|
+
"build": "bsb-plugin-cli build",
|
|
34
|
+
"start": "bsb-plugin-cli start",
|
|
35
|
+
"dev": "bsb-plugin-cli dev",
|
|
36
|
+
"test": "bsb-plugin-cli test",
|
|
37
|
+
"prepublishOnly": "npm run build",
|
|
38
|
+
"publish:client": "bsb client publish"
|
|
39
|
+
},
|
|
40
|
+
"peerDependencies": {
|
|
41
|
+
"@bsb/base": "^9.0.0"
|
|
42
|
+
},
|
|
43
|
+
"dependencies": {
|
|
44
|
+
"@opentelemetry/api": "^1.9.0",
|
|
45
|
+
"@opentelemetry/api-logs": "^0.54.0",
|
|
46
|
+
"@opentelemetry/sdk-node": "^0.54.0",
|
|
47
|
+
"@opentelemetry/sdk-trace-base": "^1.28.0",
|
|
48
|
+
"@opentelemetry/sdk-metrics": "^1.28.0",
|
|
49
|
+
"@opentelemetry/exporter-trace-otlp-http": "^0.54.0",
|
|
50
|
+
"@opentelemetry/exporter-metrics-otlp-http": "^0.54.0",
|
|
51
|
+
"@opentelemetry/exporter-logs-otlp-http": "^0.54.0",
|
|
52
|
+
"@opentelemetry/sdk-logs": "^0.54.0",
|
|
53
|
+
"@opentelemetry/resources": "^1.28.0",
|
|
54
|
+
"@opentelemetry/semantic-conventions": "^1.28.0",
|
|
55
|
+
"zod": "^4.3.6"
|
|
56
|
+
},
|
|
57
|
+
"devDependencies": {
|
|
58
|
+
"@types/node": "^25.0.0",
|
|
59
|
+
"typescript": "^5.9.0",
|
|
60
|
+
"mocha": "^11.0.0",
|
|
61
|
+
"@bsb/base": "file:../../../nodejs"
|
|
62
|
+
},
|
|
63
|
+
"engines": {
|
|
64
|
+
"node": ">=23.0.0",
|
|
65
|
+
"npm": ">=11.0.0"
|
|
66
|
+
},
|
|
67
|
+
"homepage": "https://io.bsbcode.dev/plugins/bsb/observable-opentelemetry"
|
|
68
|
+
}
|
|
69
|
+
|