@lokalise/opentelemetry-fastify-bootstrap 1.1.0 → 1.2.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.md CHANGED
@@ -1,13 +1,13 @@
1
- Copyright 2024 Lokalise, Inc.
2
-
3
- Licensed under the Apache License, Version 2.0 (the "License");
4
- you may not use this file except in compliance with the License.
5
- You may obtain a copy of the License at
6
-
7
- http://www.apache.org/licenses/LICENSE-2.0
8
-
9
- Unless required by applicable law or agreed to in writing, software
10
- distributed under the License is distributed on an "AS IS" BASIS,
11
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- See the License for the specific language governing permissions and
13
- limitations under the License.
1
+ Copyright 2024 Lokalise, Inc.
2
+
3
+ Licensed under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License.
5
+ You may obtain a copy of the License at
6
+
7
+ http://www.apache.org/licenses/LICENSE-2.0
8
+
9
+ Unless required by applicable law or agreed to in writing, software
10
+ distributed under the License is distributed on an "AS IS" BASIS,
11
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ See the License for the specific language governing permissions and
13
+ limitations under the License.
package/README.md CHANGED
@@ -1,77 +1,92 @@
1
- # OpenTelemetry Fastify Bootstrap
2
-
3
- This package provides a pre-configured OpenTelemetry setup for Fastify applications with automatic instrumentation.
4
-
5
- **Important:** OpenTelemetry must be initialized before importing any modules you want to instrument (fastify, http, etc.), because it works by patching module exports at import time. This requires using dynamic imports to control the loading order.
6
-
7
- ## Installation
8
-
9
- ```bash
10
- npm install @lokalise/opentelemetry-fastify-bootstrap
11
- ```
12
-
13
- ## Usage
14
-
15
- Your application entry point must use dynamic `await import()` to ensure OpenTelemetry initializes before other modules are loaded:
16
-
17
- ```ts
18
- // index.ts (entry point)
19
-
20
- // This MUST be first - initializes OpenTelemetry before anything else
21
- const { initOpenTelemetry } = await import('@lokalise/opentelemetry-fastify-bootstrap')
22
- initOpenTelemetry({
23
- skippedPaths: ['/health', '/ready', '/live', '/metrics', '/'],
24
- })
25
-
26
- // Now dynamically import your actual server code
27
- const server = await import('./server.ts')
28
- await server.start()
29
- ```
30
-
31
- **Why dynamic imports?** Static imports in ESM are hoisted and resolved together before any code executes. Dynamic `await import()` ensures sequential loading - the package fully initializes before server.ts is even parsed.
32
-
33
- ### Using defaults
34
-
35
- If you don't need custom skipped paths:
36
-
37
- ```ts
38
- const { initOpenTelemetry } = await import('@lokalise/opentelemetry-fastify-bootstrap')
39
- initOpenTelemetry()
40
- ```
41
-
42
- ## Configuration
43
-
44
- ### Environment Variables
45
-
46
- | Variable | Description | Default |
47
- |----------|-------------|---------|
48
- | `NODE_ENV` | When set to `test`, OpenTelemetry is disabled | - |
49
- | `OPEN_TELEMETRY_ENABLED` | Set to `true` to enable OpenTelemetry | `false` |
50
- | `OPEN_TELEMETRY_EXPORTER_URL` | OTLP gRPC exporter URL | `grpc://localhost:4317` |
51
-
52
- ### Options
53
-
54
- | Option | Type | Default | Description |
55
- |--------|------|---------|-------------|
56
- | `skippedPaths` | `string[]` | `['/health', '/metrics', '/']` | Paths to exclude from tracing |
57
-
58
- ## Features
59
-
60
- - Automatic instrumentation for Node.js applications via `@opentelemetry/auto-instrumentations-node`
61
- - Fastify-specific instrumentation via `@fastify/otel`
62
- - OTLP gRPC trace exporter
63
- - Configurable path filtering
64
- - Graceful shutdown support
65
-
66
- ## Graceful Shutdown
67
-
68
- To properly shutdown the OpenTelemetry SDK when your application exits:
69
-
70
- ```ts
71
- import { gracefulOtelShutdown } from '@lokalise/opentelemetry-fastify-bootstrap'
72
-
73
- process.on('SIGTERM', async () => {
74
- await gracefulOtelShutdown()
75
- process.exit(0)
76
- })
77
- ```
1
+ # OpenTelemetry Fastify Bootstrap
2
+
3
+ This package provides a pre-configured OpenTelemetry setup for Fastify applications with automatic instrumentation.
4
+
5
+ **Important:** OpenTelemetry must be initialized before importing any modules you want to instrument (fastify, http, etc.), because it works by patching module exports at import time. This requires using dynamic imports to control the loading order.
6
+
7
+ ## Installation
8
+
9
+ ```bash
10
+ npm install @lokalise/opentelemetry-fastify-bootstrap
11
+ ```
12
+
13
+ ## Usage
14
+
15
+ Your application entry point must use dynamic `await import()` to ensure OpenTelemetry initializes before other modules are loaded:
16
+
17
+ ```ts
18
+ // index.ts (entry point)
19
+
20
+ // This MUST be first - initializes OpenTelemetry before anything else
21
+ const { initOpenTelemetry } = await import('@lokalise/opentelemetry-fastify-bootstrap')
22
+ initOpenTelemetry({
23
+ skippedPaths: ['/health', '/ready', '/live', '/metrics', '/'],
24
+ })
25
+
26
+ // Now dynamically import your actual server code
27
+ const server = await import('./server.ts')
28
+ await server.start()
29
+ ```
30
+
31
+ **Why dynamic imports?** Static imports in ESM are hoisted and resolved together before any code executes. Dynamic `await import()` ensures sequential loading - the package fully initializes before server.ts is even parsed.
32
+
33
+ ### Using defaults
34
+
35
+ If you don't need custom skipped paths:
36
+
37
+ ```ts
38
+ const { initOpenTelemetry } = await import('@lokalise/opentelemetry-fastify-bootstrap')
39
+ initOpenTelemetry()
40
+ ```
41
+
42
+ ## Configuration
43
+
44
+ ### Environment Variables
45
+
46
+ | Variable | Description | Default |
47
+ |----------|-------------|---------|
48
+ | `NODE_ENV` | When set to `test`, OpenTelemetry is disabled | - |
49
+ | `OPEN_TELEMETRY_ENABLED` | Set to `true` to enable OpenTelemetry | `false` |
50
+ | `OPEN_TELEMETRY_EXPORTER_URL` | OTLP gRPC exporter URL | `grpc://localhost:4317` |
51
+
52
+ ### Options
53
+
54
+ | Option | Type | Default | Description |
55
+ |--------|------|---------|-------------|
56
+ | `skippedPaths` | `string[]` | `['/health', '/metrics', '/']` | Paths to exclude from tracing |
57
+ | `consoleSpans` | `boolean` | `false` | Enable console span exporter for debugging |
58
+
59
+ ### Debugging with Console Spans
60
+
61
+ For local development and debugging, you can enable console span output to see traces printed directly to the console:
62
+
63
+ ```ts
64
+ const { initOpenTelemetry } = await import('@lokalise/opentelemetry-fastify-bootstrap')
65
+ initOpenTelemetry({
66
+ consoleSpans: true, // Prints spans to console for debugging
67
+ })
68
+ ```
69
+
70
+ When enabled, spans are printed to the console in addition to being sent to the OTLP exporter. This is useful for verifying that instrumentation is working correctly without needing to run a full observability stack.
71
+
72
+ ## Features
73
+
74
+ - Automatic instrumentation for Node.js applications via `@opentelemetry/auto-instrumentations-node`
75
+ - Fastify-specific instrumentation via `@fastify/otel`
76
+ - OTLP gRPC trace exporter
77
+ - Configurable path filtering
78
+ - Optional console span exporter for debugging
79
+ - Graceful shutdown support
80
+
81
+ ## Graceful Shutdown
82
+
83
+ To properly shutdown the OpenTelemetry SDK when your application exits:
84
+
85
+ ```ts
86
+ import { gracefulOtelShutdown } from '@lokalise/opentelemetry-fastify-bootstrap'
87
+
88
+ process.on('SIGTERM', async () => {
89
+ await gracefulOtelShutdown()
90
+ process.exit(0)
91
+ })
92
+ ```
package/dist/index.d.ts CHANGED
@@ -4,6 +4,12 @@ export interface OpenTelemetryOptions {
4
4
  * @default ['/health', '/metrics', '/']
5
5
  */
6
6
  skippedPaths?: string[];
7
+ /**
8
+ * Enable console span exporter for debugging purposes.
9
+ * When enabled, spans will be printed to the console in addition to the OTLP exporter.
10
+ * @default false
11
+ */
12
+ consoleSpans?: boolean;
7
13
  }
8
14
  /**
9
15
  * Initialize OpenTelemetry instrumentation.
package/dist/index.js CHANGED
@@ -2,6 +2,7 @@ import { FastifyOtelInstrumentation } from '@fastify/otel';
2
2
  import { getNodeAutoInstrumentations } from '@opentelemetry/auto-instrumentations-node';
3
3
  import { OTLPTraceExporter as OTLPTraceExporterGrpc } from '@opentelemetry/exporter-trace-otlp-grpc';
4
4
  import { NodeSDK } from '@opentelemetry/sdk-node';
5
+ import { ConsoleSpanExporter, SimpleSpanProcessor } from '@opentelemetry/sdk-trace-base';
5
6
  function createLogEntry(level, msg, data) {
6
7
  return {
7
8
  level,
@@ -58,7 +59,7 @@ let sdk;
58
59
  * ```
59
60
  */
60
61
  export function initOpenTelemetry(options = {}) {
61
- const { skippedPaths = DEFAULT_SKIPPED_PATHS } = options;
62
+ const { skippedPaths = DEFAULT_SKIPPED_PATHS, consoleSpans = false } = options;
62
63
  logger.info('[OTEL] initOpenTelemetry called');
63
64
  const isOpenTelemetryEnabled = process.env.NODE_ENV !== 'test' && process.env.OPEN_TELEMETRY_ENABLED?.toLowerCase() === 'true';
64
65
  logger.info({
@@ -66,6 +67,7 @@ export function initOpenTelemetry(options = {}) {
66
67
  openTelemetryEnabled: process.env.OPEN_TELEMETRY_ENABLED,
67
68
  isOpenTelemetryEnabled,
68
69
  skippedPaths,
70
+ consoleSpans,
69
71
  }, '[OTEL] Configuration');
70
72
  if (isOpenTelemetryEnabled && !isInstrumentationRegistered) {
71
73
  logger.info('[OTEL] Initializing OpenTelemetry SDK...');
@@ -80,6 +82,10 @@ export function initOpenTelemetry(options = {}) {
80
82
  // Setup SDK
81
83
  sdk = new NodeSDK({
82
84
  traceExporter,
85
+ // Add console span exporter for debugging when enabled
86
+ spanProcessors: consoleSpans
87
+ ? [new SimpleSpanProcessor(new ConsoleSpanExporter())]
88
+ : undefined,
83
89
  instrumentations: [
84
90
  getNodeAutoInstrumentations({
85
91
  '@opentelemetry/instrumentation-fastify': {
@@ -100,6 +106,9 @@ export function initOpenTelemetry(options = {}) {
100
106
  });
101
107
  sdk.start();
102
108
  isInstrumentationRegistered = true;
109
+ if (consoleSpans) {
110
+ logger.info('[OTEL] Console span exporter enabled for debugging');
111
+ }
103
112
  logger.info('[OTEL] SDK started successfully - ready to send traces');
104
113
  }
105
114
  else {
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,eAAe,CAAA;AAC1D,OAAO,EAAE,2BAA2B,EAAE,MAAM,2CAA2C,CAAA;AACvF,OAAO,EAAE,iBAAiB,IAAI,qBAAqB,EAAE,MAAM,y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,MAAM,CAAC,IAAI,CAAC,wDAAwD,CAAC,CAAA;IACvE,CAAC;SAAM,CAAC;QACN,MAAM,CAAC,IAAI,CAAC,wDAAwD,CAAC,CAAA;IACvE,CAAC;AACH,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,oBAAoB;IACxC,MAAM,CAAC,IAAI,CAAC,2BAA2B,CAAC,CAAA;IACxC,IAAI,CAAC,GAAG,EAAE,CAAC;QACT,MAAM,CAAC,IAAI,CAAC,oCAAoC,CAAC,CAAA;QACjD,OAAM;IACR,CAAC;IACD,IAAI,CAAC;QACH,MAAM,GAAG,CAAC,QAAQ,EAAE,CAAA;QACpB,2BAA2B,GAAG,KAAK,CAAA;QACnC,MAAM,CAAC,IAAI,CAAC,4CAA4C,CAAC,CAAA;IAC3D,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,EAAE,kCAAkC,CAAC,CAAA;IAC7D,CAAC;AACH,CAAC"}
package/package.json CHANGED
@@ -1,57 +1,58 @@
1
- {
2
- "name": "@lokalise/opentelemetry-fastify-bootstrap",
3
- "version": "1.1.0",
4
- "type": "module",
5
- "files": [
6
- "dist",
7
- "README.md",
8
- "LICENSE.md"
9
- ],
10
- "license": "Apache-2.0",
11
- "main": "./dist/index.js",
12
- "module": "./dist/index.js",
13
- "types": "./dist/index.d.ts",
14
- "exports": {
15
- ".": "./dist/index.js",
16
- "./package.json": "./package.json"
17
- },
18
- "keywords": [
19
- "opentelemetry",
20
- "otel",
21
- "fastify",
22
- "tracing",
23
- "instrumentation",
24
- "bootstrap"
25
- ],
26
- "homepage": "https://github.com/lokalise/shared-ts-libs",
27
- "repository": {
28
- "type": "git",
29
- "url": "git://github.com/lokalise/shared-ts-libs.git"
30
- },
31
- "publishConfig": {
32
- "access": "public"
33
- },
34
- "scripts": {
35
- "build": "rimraf dist && tsc --project tsconfig.build.json",
36
- "lint": "biome check . && tsc",
37
- "lint:fix": "biome check --write",
38
- "prepublishOnly": "npm run build",
39
- "package-version": "echo $npm_package_version",
40
- "postversion": "biome check --write package.json"
41
- },
42
- "dependencies": {},
43
- "peerDependencies": {
44
- "fastify": ">=5.0.0",
45
- "@fastify/otel": ">=0.16.0",
46
- "@opentelemetry/auto-instrumentations-node": ">=0.67.3",
47
- "@opentelemetry/exporter-trace-otlp-grpc": ">=0.208.0",
48
- "@opentelemetry/sdk-node": ">=0.208.0"
49
- },
50
- "devDependencies": {
51
- "@biomejs/biome": "^2.3.7",
52
- "@lokalise/biome-config": "^3.1.0",
53
- "@lokalise/tsconfig": "~1.2.0",
54
- "rimraf": "^6.1.2",
55
- "typescript": "5.9.3"
56
- }
57
- }
1
+ {
2
+ "name": "@lokalise/opentelemetry-fastify-bootstrap",
3
+ "version": "1.2.0",
4
+ "type": "module",
5
+ "files": [
6
+ "dist",
7
+ "README.md",
8
+ "LICENSE.md"
9
+ ],
10
+ "license": "Apache-2.0",
11
+ "main": "./dist/index.js",
12
+ "module": "./dist/index.js",
13
+ "types": "./dist/index.d.ts",
14
+ "exports": {
15
+ ".": "./dist/index.js",
16
+ "./package.json": "./package.json"
17
+ },
18
+ "keywords": [
19
+ "opentelemetry",
20
+ "otel",
21
+ "fastify",
22
+ "tracing",
23
+ "instrumentation",
24
+ "bootstrap"
25
+ ],
26
+ "homepage": "https://github.com/lokalise/shared-ts-libs",
27
+ "repository": {
28
+ "type": "git",
29
+ "url": "git://github.com/lokalise/shared-ts-libs.git"
30
+ },
31
+ "publishConfig": {
32
+ "access": "public"
33
+ },
34
+ "scripts": {
35
+ "build": "rimraf dist && tsc --project tsconfig.build.json",
36
+ "lint": "biome check . && tsc",
37
+ "lint:fix": "biome check --write",
38
+ "prepublishOnly": "npm run build",
39
+ "package-version": "echo $npm_package_version",
40
+ "postversion": "biome check --write package.json"
41
+ },
42
+ "dependencies": {},
43
+ "peerDependencies": {
44
+ "fastify": ">=5.0.0",
45
+ "@fastify/otel": ">=0.16.0",
46
+ "@opentelemetry/auto-instrumentations-node": ">=0.67.3",
47
+ "@opentelemetry/exporter-trace-otlp-grpc": ">=0.208.0",
48
+ "@opentelemetry/sdk-node": ">=0.208.0",
49
+ "@opentelemetry/sdk-trace-base": ">=0.208.0"
50
+ },
51
+ "devDependencies": {
52
+ "@biomejs/biome": "^2.3.7",
53
+ "@lokalise/biome-config": "^3.1.0",
54
+ "@lokalise/tsconfig": "~1.2.0",
55
+ "rimraf": "^6.1.2",
56
+ "typescript": "5.9.3"
57
+ }
58
+ }