@forinda/kickjs-otel 1.2.12 → 1.3.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/README.md +59 -0
- package/package.json +26 -7
package/README.md
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# @forinda/kickjs-otel
|
|
2
|
+
|
|
3
|
+
OpenTelemetry adapter for KickJS — automatic tracing, metrics, and export to any OTel backend.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
# Using the KickJS CLI (recommended — auto-installs peer dependencies)
|
|
9
|
+
kick add otel
|
|
10
|
+
|
|
11
|
+
# Manual install
|
|
12
|
+
pnpm add @forinda/kickjs-otel @opentelemetry/api @opentelemetry/semantic-conventions
|
|
13
|
+
# Optional SDK packages
|
|
14
|
+
pnpm add @opentelemetry/sdk-node @opentelemetry/sdk-trace-base @opentelemetry/sdk-metrics
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Features
|
|
18
|
+
|
|
19
|
+
- `OtelAdapter` — lifecycle adapter that instruments requests with spans and metrics
|
|
20
|
+
- Works with any OpenTelemetry-compatible backend (Jaeger, Grafana Tempo, Datadog, etc.)
|
|
21
|
+
- Zero-config console exporter for development
|
|
22
|
+
|
|
23
|
+
## Quick Example
|
|
24
|
+
|
|
25
|
+
```typescript
|
|
26
|
+
import { OtelAdapter } from '@forinda/kickjs-otel'
|
|
27
|
+
|
|
28
|
+
bootstrap({
|
|
29
|
+
modules,
|
|
30
|
+
adapters: [
|
|
31
|
+
new OtelAdapter({
|
|
32
|
+
serviceName: 'my-api',
|
|
33
|
+
enabled: true,
|
|
34
|
+
}),
|
|
35
|
+
],
|
|
36
|
+
})
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
For production, initialize the OTel SDK before bootstrap:
|
|
40
|
+
|
|
41
|
+
```typescript
|
|
42
|
+
import { NodeSDK } from '@opentelemetry/sdk-node'
|
|
43
|
+
import { OTLPTraceExporter } from '@opentelemetry/exporter-trace-otlp-http'
|
|
44
|
+
|
|
45
|
+
const sdk = new NodeSDK({
|
|
46
|
+
traceExporter: new OTLPTraceExporter({
|
|
47
|
+
url: 'http://localhost:4318/v1/traces',
|
|
48
|
+
}),
|
|
49
|
+
})
|
|
50
|
+
sdk.start()
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Documentation
|
|
54
|
+
|
|
55
|
+
[Full documentation](https://forinda.github.io/kick-js/)
|
|
56
|
+
|
|
57
|
+
## License
|
|
58
|
+
|
|
59
|
+
MIT
|
package/package.json
CHANGED
|
@@ -1,23 +1,42 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forinda/kickjs-otel",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "OpenTelemetry adapter for KickJS — automatic tracing, metrics, and export to any OTel backend",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"kickjs",
|
|
7
7
|
"nodejs",
|
|
8
8
|
"typescript",
|
|
9
|
+
"express",
|
|
10
|
+
"decorators",
|
|
11
|
+
"dependency-injection",
|
|
12
|
+
"backend",
|
|
13
|
+
"api",
|
|
14
|
+
"framework",
|
|
9
15
|
"opentelemetry",
|
|
10
|
-
"otel",
|
|
11
16
|
"tracing",
|
|
12
17
|
"metrics",
|
|
13
18
|
"observability",
|
|
14
19
|
"jaeger",
|
|
15
20
|
"grafana",
|
|
16
21
|
"datadog",
|
|
17
|
-
"
|
|
18
|
-
"framework",
|
|
22
|
+
"prometheus",
|
|
19
23
|
"@forinda/kickjs-core",
|
|
20
|
-
"@forinda/kickjs-http"
|
|
24
|
+
"@forinda/kickjs-http",
|
|
25
|
+
"@forinda/kickjs-config",
|
|
26
|
+
"@forinda/kickjs-cli",
|
|
27
|
+
"@forinda/kickjs-swagger",
|
|
28
|
+
"@forinda/kickjs-testing",
|
|
29
|
+
"@forinda/kickjs-prisma",
|
|
30
|
+
"@forinda/kickjs-ws",
|
|
31
|
+
"@forinda/kickjs-drizzle",
|
|
32
|
+
"@forinda/kickjs-graphql",
|
|
33
|
+
"@forinda/kickjs-auth",
|
|
34
|
+
"@forinda/kickjs-cron",
|
|
35
|
+
"@forinda/kickjs-mailer",
|
|
36
|
+
"@forinda/kickjs-queue",
|
|
37
|
+
"@forinda/kickjs-multi-tenant",
|
|
38
|
+
"@forinda/kickjs-devtools",
|
|
39
|
+
"@forinda/kickjs-notifications"
|
|
21
40
|
],
|
|
22
41
|
"type": "module",
|
|
23
42
|
"main": "dist/index.js",
|
|
@@ -33,8 +52,8 @@
|
|
|
33
52
|
],
|
|
34
53
|
"dependencies": {
|
|
35
54
|
"reflect-metadata": "^0.2.2",
|
|
36
|
-
"@forinda/kickjs-core": "1.
|
|
37
|
-
"@forinda/kickjs-http": "1.
|
|
55
|
+
"@forinda/kickjs-core": "1.3.0",
|
|
56
|
+
"@forinda/kickjs-http": "1.3.0"
|
|
38
57
|
},
|
|
39
58
|
"peerDependencies": {
|
|
40
59
|
"@opentelemetry/api": ">=1.4.0",
|