@celerity-sdk/telemetry 0.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 +201 -0
- package/README.md +85 -0
- package/dist/index.cjs +594 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +106 -0
- package/dist/index.d.ts +106 -0
- package/dist/index.js +544 -0
- package/dist/index.js.map +1 -0
- package/dist/setup.d.ts +2 -0
- package/dist/setup.js +138 -0
- package/dist/setup.js.map +1 -0
- package/package.json +90 -0
package/dist/setup.js
ADDED
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
3
|
+
|
|
4
|
+
// src/init.ts
|
|
5
|
+
import createDebug2 from "debug";
|
|
6
|
+
import { NodeSDK } from "@opentelemetry/sdk-node";
|
|
7
|
+
import { resourceFromAttributes } from "@opentelemetry/resources";
|
|
8
|
+
import { ATTR_SERVICE_NAME, ATTR_SERVICE_VERSION } from "@opentelemetry/semantic-conventions";
|
|
9
|
+
import { OTLPTraceExporter } from "@opentelemetry/exporter-trace-otlp-grpc";
|
|
10
|
+
import { OTLPLogExporter } from "@opentelemetry/exporter-logs-otlp-grpc";
|
|
11
|
+
import { BatchLogRecordProcessor } from "@opentelemetry/sdk-logs";
|
|
12
|
+
import { CompositePropagator, W3CTraceContextPropagator } from "@opentelemetry/core";
|
|
13
|
+
import { AWSXRayPropagator } from "@opentelemetry/propagator-aws-xray";
|
|
14
|
+
import { AWSXRayIdGenerator } from "@opentelemetry/id-generator-aws-xray";
|
|
15
|
+
|
|
16
|
+
// src/env.ts
|
|
17
|
+
var VALID_LOG_LEVELS = /* @__PURE__ */ new Set([
|
|
18
|
+
"debug",
|
|
19
|
+
"info",
|
|
20
|
+
"warn",
|
|
21
|
+
"error"
|
|
22
|
+
]);
|
|
23
|
+
var VALID_LOG_FORMATS = /* @__PURE__ */ new Set([
|
|
24
|
+
"json",
|
|
25
|
+
"human",
|
|
26
|
+
"auto"
|
|
27
|
+
]);
|
|
28
|
+
function readTelemetryEnv() {
|
|
29
|
+
const rawLevel = process.env.CELERITY_LOG_LEVEL;
|
|
30
|
+
const rawFormat = process.env.CELERITY_LOG_FORMAT;
|
|
31
|
+
return {
|
|
32
|
+
tracingEnabled: process.env.CELERITY_TELEMETRY_ENABLED === "true",
|
|
33
|
+
otlpEndpoint: process.env.OTEL_EXPORTER_OTLP_ENDPOINT ?? process.env.CELERITY_TRACE_OTLP_COLLECTOR_ENDPOINT ?? "http://otelcollector:4317",
|
|
34
|
+
serviceName: process.env.OTEL_SERVICE_NAME ?? "celerity-app",
|
|
35
|
+
serviceVersion: process.env.OTEL_SERVICE_VERSION ?? "0.0.0",
|
|
36
|
+
logLevel: rawLevel && VALID_LOG_LEVELS.has(rawLevel) ? rawLevel : "info",
|
|
37
|
+
logFormat: rawFormat && VALID_LOG_FORMATS.has(rawFormat) ? rawFormat : "auto",
|
|
38
|
+
logFilePath: process.env.CELERITY_LOG_FILE_PATH ?? null
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
__name(readTelemetryEnv, "readTelemetryEnv");
|
|
42
|
+
|
|
43
|
+
// src/instrumentations.ts
|
|
44
|
+
import createDebug from "debug";
|
|
45
|
+
import { HttpInstrumentation } from "@opentelemetry/instrumentation-http";
|
|
46
|
+
import { UndiciInstrumentation } from "@opentelemetry/instrumentation-undici";
|
|
47
|
+
var debug = createDebug("celerity:telemetry");
|
|
48
|
+
async function buildInstrumentations() {
|
|
49
|
+
const instrumentations = [
|
|
50
|
+
new HttpInstrumentation(),
|
|
51
|
+
new UndiciInstrumentation()
|
|
52
|
+
];
|
|
53
|
+
const optionalPackages = [
|
|
54
|
+
"@opentelemetry/instrumentation-aws-sdk",
|
|
55
|
+
"@opentelemetry/instrumentation-ioredis",
|
|
56
|
+
"@opentelemetry/instrumentation-pg",
|
|
57
|
+
"@opentelemetry/instrumentation-mysql2"
|
|
58
|
+
];
|
|
59
|
+
for (const name of optionalPackages) {
|
|
60
|
+
try {
|
|
61
|
+
const pkg = name;
|
|
62
|
+
const mod = await import(pkg);
|
|
63
|
+
const InstrumentationClass = findInstrumentationExport(mod);
|
|
64
|
+
if (InstrumentationClass) {
|
|
65
|
+
debug("instrumentation: loaded %s", name);
|
|
66
|
+
instrumentations.push(new InstrumentationClass());
|
|
67
|
+
}
|
|
68
|
+
} catch (err) {
|
|
69
|
+
const code = err.code;
|
|
70
|
+
if (code !== "ERR_MODULE_NOT_FOUND" && code !== "MODULE_NOT_FOUND") {
|
|
71
|
+
debug("instrumentation: failed to load %s: %O", name, err);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
return instrumentations;
|
|
76
|
+
}
|
|
77
|
+
__name(buildInstrumentations, "buildInstrumentations");
|
|
78
|
+
function findInstrumentationExport(mod) {
|
|
79
|
+
for (const value of Object.values(mod)) {
|
|
80
|
+
if (typeof value === "function" && value.prototype && "enable" in value.prototype) {
|
|
81
|
+
return value;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
return null;
|
|
85
|
+
}
|
|
86
|
+
__name(findInstrumentationExport, "findInstrumentationExport");
|
|
87
|
+
|
|
88
|
+
// src/init.ts
|
|
89
|
+
var debug2 = createDebug2("celerity:telemetry");
|
|
90
|
+
var initialized = false;
|
|
91
|
+
var sdk = null;
|
|
92
|
+
async function initTelemetry() {
|
|
93
|
+
if (initialized) {
|
|
94
|
+
debug2("initTelemetry: already initialized, skipping");
|
|
95
|
+
return;
|
|
96
|
+
}
|
|
97
|
+
const config = readTelemetryEnv();
|
|
98
|
+
if (!config.tracingEnabled) {
|
|
99
|
+
debug2("initTelemetry: tracing disabled, skipping");
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
const platform = process.env.CELERITY_RUNTIME_PLATFORM ?? "local";
|
|
103
|
+
const isAws = platform === "aws";
|
|
104
|
+
debug2("initTelemetry: platform=%s endpoint=%s service=%s", platform, config.otlpEndpoint, config.serviceName);
|
|
105
|
+
const instrumentations = await buildInstrumentations();
|
|
106
|
+
sdk = new NodeSDK({
|
|
107
|
+
resource: resourceFromAttributes({
|
|
108
|
+
[ATTR_SERVICE_NAME]: config.serviceName,
|
|
109
|
+
[ATTR_SERVICE_VERSION]: config.serviceVersion
|
|
110
|
+
}),
|
|
111
|
+
traceExporter: new OTLPTraceExporter({
|
|
112
|
+
url: config.otlpEndpoint
|
|
113
|
+
}),
|
|
114
|
+
logRecordProcessors: [
|
|
115
|
+
new BatchLogRecordProcessor(new OTLPLogExporter({
|
|
116
|
+
url: config.otlpEndpoint
|
|
117
|
+
}))
|
|
118
|
+
],
|
|
119
|
+
textMapPropagator: new CompositePropagator({
|
|
120
|
+
propagators: [
|
|
121
|
+
new W3CTraceContextPropagator(),
|
|
122
|
+
new AWSXRayPropagator()
|
|
123
|
+
]
|
|
124
|
+
}),
|
|
125
|
+
...isAws ? {
|
|
126
|
+
idGenerator: new AWSXRayIdGenerator()
|
|
127
|
+
} : {},
|
|
128
|
+
instrumentations
|
|
129
|
+
});
|
|
130
|
+
sdk.start();
|
|
131
|
+
initialized = true;
|
|
132
|
+
debug2("initTelemetry: SDK started");
|
|
133
|
+
}
|
|
134
|
+
__name(initTelemetry, "initTelemetry");
|
|
135
|
+
|
|
136
|
+
// src/setup.ts
|
|
137
|
+
await initTelemetry();
|
|
138
|
+
//# sourceMappingURL=setup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/init.ts","../src/env.ts","../src/instrumentations.ts","../src/setup.ts"],"sourcesContent":["import createDebug from \"debug\";\nimport { NodeSDK } from \"@opentelemetry/sdk-node\";\nimport { resourceFromAttributes } from \"@opentelemetry/resources\";\nimport { ATTR_SERVICE_NAME, ATTR_SERVICE_VERSION } from \"@opentelemetry/semantic-conventions\";\nimport { OTLPTraceExporter } from \"@opentelemetry/exporter-trace-otlp-grpc\";\nimport { OTLPLogExporter } from \"@opentelemetry/exporter-logs-otlp-grpc\";\nimport { BatchLogRecordProcessor } from \"@opentelemetry/sdk-logs\";\nimport { CompositePropagator, W3CTraceContextPropagator } from \"@opentelemetry/core\";\nimport { AWSXRayPropagator } from \"@opentelemetry/propagator-aws-xray\";\nimport { AWSXRayIdGenerator } from \"@opentelemetry/id-generator-aws-xray\";\nimport { readTelemetryEnv } from \"./env\";\nimport { buildInstrumentations } from \"./instrumentations\";\n\nconst debug = createDebug(\"celerity:telemetry\");\n\nlet initialized = false;\nlet sdk: NodeSDK | null = null;\n\nexport function isInitialized(): boolean {\n return initialized;\n}\n\nexport async function initTelemetry(): Promise<void> {\n if (initialized) {\n debug(\"initTelemetry: already initialized, skipping\");\n return;\n }\n\n const config = readTelemetryEnv();\n if (!config.tracingEnabled) {\n debug(\"initTelemetry: tracing disabled, skipping\");\n return;\n }\n\n const platform = process.env.CELERITY_RUNTIME_PLATFORM ?? \"local\";\n const isAws = platform === \"aws\";\n debug(\n \"initTelemetry: platform=%s endpoint=%s service=%s\",\n platform,\n config.otlpEndpoint,\n config.serviceName,\n );\n\n const instrumentations = await buildInstrumentations();\n\n sdk = new NodeSDK({\n resource: resourceFromAttributes({\n [ATTR_SERVICE_NAME]: config.serviceName,\n [ATTR_SERVICE_VERSION]: config.serviceVersion,\n }),\n traceExporter: new OTLPTraceExporter({ url: config.otlpEndpoint }),\n logRecordProcessors: [\n new BatchLogRecordProcessor(new OTLPLogExporter({ url: config.otlpEndpoint })),\n ],\n textMapPropagator: new CompositePropagator({\n propagators: [new W3CTraceContextPropagator(), new AWSXRayPropagator()],\n }),\n ...(isAws ? { idGenerator: new AWSXRayIdGenerator() } : {}),\n instrumentations,\n });\n\n sdk.start();\n initialized = true;\n debug(\"initTelemetry: SDK started\");\n}\n\nexport async function shutdownTelemetry(): Promise<void> {\n if (sdk) {\n debug(\"shutdownTelemetry: shutting down SDK\");\n await sdk.shutdown();\n sdk = null;\n initialized = false;\n }\n}\n","import type { LogLevel } from \"@celerity-sdk/types\";\n\nexport type TelemetryConfig = {\n tracingEnabled: boolean;\n otlpEndpoint: string;\n serviceName: string;\n serviceVersion: string;\n logLevel: LogLevel;\n logFormat: \"json\" | \"human\" | \"auto\";\n logFilePath: string | null;\n};\n\nconst VALID_LOG_LEVELS = new Set<string>([\"debug\", \"info\", \"warn\", \"error\"]);\nconst VALID_LOG_FORMATS = new Set<string>([\"json\", \"human\", \"auto\"]);\n\nexport function readTelemetryEnv(): TelemetryConfig {\n const rawLevel = process.env.CELERITY_LOG_LEVEL;\n const rawFormat = process.env.CELERITY_LOG_FORMAT;\n\n return {\n tracingEnabled: process.env.CELERITY_TELEMETRY_ENABLED === \"true\",\n otlpEndpoint:\n process.env.OTEL_EXPORTER_OTLP_ENDPOINT ??\n process.env.CELERITY_TRACE_OTLP_COLLECTOR_ENDPOINT ??\n \"http://otelcollector:4317\",\n serviceName: process.env.OTEL_SERVICE_NAME ?? \"celerity-app\",\n serviceVersion: process.env.OTEL_SERVICE_VERSION ?? \"0.0.0\",\n logLevel: rawLevel && VALID_LOG_LEVELS.has(rawLevel) ? (rawLevel as LogLevel) : \"info\",\n logFormat:\n rawFormat && VALID_LOG_FORMATS.has(rawFormat)\n ? (rawFormat as \"json\" | \"human\" | \"auto\")\n : \"auto\",\n logFilePath: process.env.CELERITY_LOG_FILE_PATH ?? null,\n };\n}\n","import createDebug from \"debug\";\nimport { HttpInstrumentation } from \"@opentelemetry/instrumentation-http\";\nimport { UndiciInstrumentation } from \"@opentelemetry/instrumentation-undici\";\nimport type { Instrumentation } from \"@opentelemetry/instrumentation\";\n\nconst debug = createDebug(\"celerity:telemetry\");\n\nexport async function buildInstrumentations(): Promise<Instrumentation[]> {\n // Core instrumentation: always active — covers all HTTP/HTTPS and fetch() calls\n const instrumentations: Instrumentation[] = [\n new HttpInstrumentation() as Instrumentation,\n new UndiciInstrumentation() as Instrumentation,\n ];\n\n // Dynamically load optional instrumentation packages.\n // Each targets a specific library and silently no-ops if the library isn't installed.\n const optionalPackages = [\n \"@opentelemetry/instrumentation-aws-sdk\",\n \"@opentelemetry/instrumentation-ioredis\",\n \"@opentelemetry/instrumentation-pg\",\n \"@opentelemetry/instrumentation-mysql2\",\n ];\n\n for (const name of optionalPackages) {\n try {\n const pkg = name;\n const mod = (await import(pkg)) as Record<string, unknown>;\n const InstrumentationClass = findInstrumentationExport(mod);\n if (InstrumentationClass) {\n debug(\"instrumentation: loaded %s\", name);\n instrumentations.push(new InstrumentationClass() as Instrumentation);\n }\n } catch (err) {\n const code = (err as { code?: string }).code;\n if (code !== \"ERR_MODULE_NOT_FOUND\" && code !== \"MODULE_NOT_FOUND\") {\n debug(\"instrumentation: failed to load %s: %O\", name, err);\n }\n }\n }\n\n return instrumentations;\n}\n\nfunction findInstrumentationExport(mod: Record<string, unknown>): (new () => unknown) | null {\n for (const value of Object.values(mod)) {\n if (typeof value === \"function\" && value.prototype && \"enable\" in value.prototype) {\n return value as new () => unknown;\n }\n }\n return null;\n}\n","// Early initialization entry point for: node --import @celerity-sdk/telemetry/setup app.js\n// Registers OTel auto-instrumentations before any user code loads.\n// Only activates when CELERITY_TELEMETRY_ENABLED=true.\nimport { initTelemetry } from \"./init\";\n\nawait initTelemetry();\n"],"mappings":"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","names":["createDebug","NodeSDK","resourceFromAttributes","ATTR_SERVICE_NAME","ATTR_SERVICE_VERSION","OTLPTraceExporter","OTLPLogExporter","BatchLogRecordProcessor","CompositePropagator","W3CTraceContextPropagator","AWSXRayPropagator","AWSXRayIdGenerator","VALID_LOG_LEVELS","Set","VALID_LOG_FORMATS","readTelemetryEnv","rawLevel","process","env","CELERITY_LOG_LEVEL","rawFormat","CELERITY_LOG_FORMAT","tracingEnabled","CELERITY_TELEMETRY_ENABLED","otlpEndpoint","OTEL_EXPORTER_OTLP_ENDPOINT","CELERITY_TRACE_OTLP_COLLECTOR_ENDPOINT","serviceName","OTEL_SERVICE_NAME","serviceVersion","OTEL_SERVICE_VERSION","logLevel","has","logFormat","logFilePath","CELERITY_LOG_FILE_PATH","createDebug","HttpInstrumentation","UndiciInstrumentation","debug","createDebug","buildInstrumentations","instrumentations","HttpInstrumentation","UndiciInstrumentation","optionalPackages","name","pkg","mod","InstrumentationClass","findInstrumentationExport","push","err","code","value","Object","values","prototype","debug","createDebug","initialized","sdk","initTelemetry","initialized","debug","config","readTelemetryEnv","tracingEnabled","platform","process","env","CELERITY_RUNTIME_PLATFORM","isAws","otlpEndpoint","serviceName","instrumentations","buildInstrumentations","sdk","NodeSDK","resource","resourceFromAttributes","ATTR_SERVICE_NAME","ATTR_SERVICE_VERSION","serviceVersion","traceExporter","OTLPTraceExporter","url","logRecordProcessors","BatchLogRecordProcessor","OTLPLogExporter","textMapPropagator","CompositePropagator","propagators","W3CTraceContextPropagator","AWSXRayPropagator","idGenerator","AWSXRayIdGenerator","start","initTelemetry"]}
|
package/package.json
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@celerity-sdk/telemetry",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "Observability layer for the Celerity Node SDK — pino-based logger and OTel-based tracing",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/newstack-cloud/celerity-node-sdk.git",
|
|
9
|
+
"directory": "packages/telemetry"
|
|
10
|
+
},
|
|
11
|
+
"type": "module",
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"import": {
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
|
+
"default": "./dist/index.js"
|
|
17
|
+
},
|
|
18
|
+
"require": {
|
|
19
|
+
"types": "./dist/index.d.cts",
|
|
20
|
+
"default": "./dist/index.cjs"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"./setup": {
|
|
24
|
+
"import": "./dist/setup.js"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"main": "./dist/index.cjs",
|
|
28
|
+
"module": "./dist/index.js",
|
|
29
|
+
"types": "./dist/index.d.ts",
|
|
30
|
+
"files": [
|
|
31
|
+
"dist"
|
|
32
|
+
],
|
|
33
|
+
"engines": {
|
|
34
|
+
"node": ">=22.0.0"
|
|
35
|
+
},
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"debug": "^4.4.0",
|
|
38
|
+
"pino": "^10.0.0",
|
|
39
|
+
"@opentelemetry/api": "^1.9.0",
|
|
40
|
+
"@opentelemetry/api-logs": "^0.200.0",
|
|
41
|
+
"@opentelemetry/sdk-node": "^0.200.0",
|
|
42
|
+
"@opentelemetry/sdk-trace-node": "^2.0.0",
|
|
43
|
+
"@opentelemetry/sdk-logs": "^0.200.0",
|
|
44
|
+
"@opentelemetry/resources": "^2.0.0",
|
|
45
|
+
"@opentelemetry/semantic-conventions": "^1.25.0",
|
|
46
|
+
"@opentelemetry/exporter-trace-otlp-grpc": "^0.200.0",
|
|
47
|
+
"@opentelemetry/exporter-logs-otlp-grpc": "^0.200.0",
|
|
48
|
+
"@opentelemetry/core": "^2.0.0",
|
|
49
|
+
"@opentelemetry/propagator-aws-xray": "^2.0.0",
|
|
50
|
+
"@opentelemetry/id-generator-aws-xray": "^2.0.0",
|
|
51
|
+
"@opentelemetry/instrumentation": "^0.200.0",
|
|
52
|
+
"@opentelemetry/instrumentation-http": "^0.200.0",
|
|
53
|
+
"@opentelemetry/instrumentation-undici": "^0.14.0",
|
|
54
|
+
"@celerity-sdk/common": "^0.2.0",
|
|
55
|
+
"@celerity-sdk/types": "^0.2.0"
|
|
56
|
+
},
|
|
57
|
+
"devDependencies": {
|
|
58
|
+
"pino-pretty": "^13.0.0"
|
|
59
|
+
},
|
|
60
|
+
"peerDependencies": {
|
|
61
|
+
"@opentelemetry/instrumentation-aws-sdk": "^0.50.0",
|
|
62
|
+
"@opentelemetry/instrumentation-ioredis": "^0.50.0",
|
|
63
|
+
"@opentelemetry/instrumentation-pg": "^0.50.0",
|
|
64
|
+
"@opentelemetry/instrumentation-mysql2": "^0.50.0"
|
|
65
|
+
},
|
|
66
|
+
"peerDependenciesMeta": {
|
|
67
|
+
"@opentelemetry/instrumentation-aws-sdk": {
|
|
68
|
+
"optional": true
|
|
69
|
+
},
|
|
70
|
+
"@opentelemetry/instrumentation-ioredis": {
|
|
71
|
+
"optional": true
|
|
72
|
+
},
|
|
73
|
+
"@opentelemetry/instrumentation-pg": {
|
|
74
|
+
"optional": true
|
|
75
|
+
},
|
|
76
|
+
"@opentelemetry/instrumentation-mysql2": {
|
|
77
|
+
"optional": true
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"publishConfig": {
|
|
81
|
+
"access": "public"
|
|
82
|
+
},
|
|
83
|
+
"scripts": {
|
|
84
|
+
"build": "tsup",
|
|
85
|
+
"dev": "tsup --watch",
|
|
86
|
+
"typecheck": "tsc --noEmit",
|
|
87
|
+
"clean": "rm -rf dist",
|
|
88
|
+
"test": "vitest run"
|
|
89
|
+
}
|
|
90
|
+
}
|