@webtypen/webframez-core 0.3.15 → 0.3.16

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.
@@ -23,7 +23,6 @@ const QueueStopCommand_1 = require("./Commands/QueueStopCommand");
23
23
  const QueueLogCommand_1 = require("./Commands/QueueLogCommand");
24
24
  const QueueWorkerAutorestartCommand_1 = require("./Commands/QueueWorkerAutorestartCommand");
25
25
  const info_1 = require("./info");
26
- const SigNozTelemetry_1 = require("./Telemetry/SigNozTelemetry");
27
26
  class ConsoleApplication {
28
27
  constructor() {
29
28
  this.systemCommands = [
@@ -45,9 +44,9 @@ class ConsoleApplication {
45
44
  Config_1.Config.register(key, options.config[key]);
46
45
  }
47
46
  }
48
- if (options && options.signoz) {
49
- void SigNozTelemetry_1.SigNozTelemetry.init(options.signoz);
50
- }
47
+ // if (options && options.signoz) {
48
+ // void SigNozTelemetry.init(options.signoz);
49
+ // }
51
50
  if (options && options.datatables) {
52
51
  DatatableRegistry_1.DatatableRegistry.registerMany(options.datatables);
53
52
  }
@@ -1,33 +0,0 @@
1
- export interface SigNozOptions {
2
- enabled?: boolean;
3
- serviceName?: string;
4
- endpoint?: string;
5
- apiKey?: string;
6
- headers?: Record<string, string>;
7
- environment?: string;
8
- resourceAttributes?: Record<string, unknown>;
9
- samplingRatio?: number;
10
- instrumentations?: any[];
11
- autoInstrumentations?: boolean;
12
- autoInstrumentationConfig?: Record<string, unknown>;
13
- logInitialization?: boolean;
14
- }
15
- export declare class SigNozTelemetry {
16
- private static sdk;
17
- private static initPromise;
18
- private static shutdownRegistered;
19
- private static readonly missingDependencies;
20
- private static readonly shutdownListener;
21
- static init(options?: SigNozOptions): Promise<void>;
22
- private static initialize;
23
- static shutdown(): Promise<void>;
24
- private static safeImport;
25
- private static ensureEndpoint;
26
- private static warnMissingDependency;
27
- private static registerShutdownHooks;
28
- private static getProcess;
29
- private static getEnv;
30
- private static getConsole;
31
- private static logInfo;
32
- private static logWarn;
33
- }
@@ -1,253 +1,235 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
26
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
27
- return new (P || (P = Promise))(function (resolve, reject) {
28
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
29
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
30
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
31
- step((generator = generator.apply(thisArg, _arguments || [])).next());
32
- });
33
- };
34
- Object.defineProperty(exports, "__esModule", { value: true });
35
- exports.SigNozTelemetry = void 0;
36
- const Config_1 = require("../Config");
37
- class SigNozTelemetry {
38
- static init(options) {
39
- return __awaiter(this, void 0, void 0, function* () {
40
- if (!options || options.enabled === false) {
41
- return;
42
- }
43
- if (this.sdk) {
44
- return;
45
- }
46
- if (this.initPromise) {
47
- yield this.initPromise;
48
- return;
49
- }
50
- const initialization = (() => __awaiter(this, void 0, void 0, function* () {
51
- try {
52
- yield this.initialize(options);
53
- }
54
- catch (error) {
55
- this.logWarn("[SigNoz] Initialization failed:", error);
56
- }
57
- }))();
58
- this.initPromise = initialization;
59
- try {
60
- yield initialization;
61
- }
62
- finally {
63
- this.initPromise = null;
64
- }
65
- });
66
- }
67
- static initialize(options) {
68
- return __awaiter(this, void 0, void 0, function* () {
69
- const sdkModule = yield this.safeImport("@opentelemetry/sdk-node");
70
- const traceExporterModule = yield this.safeImport("@opentelemetry/exporter-trace-otlp-http");
71
- const resourcesModule = yield this.safeImport("@opentelemetry/resources");
72
- const semanticModule = yield this.safeImport("@opentelemetry/semantic-conventions");
73
- if (!(sdkModule === null || sdkModule === void 0 ? void 0 : sdkModule.NodeSDK) || !(traceExporterModule === null || traceExporterModule === void 0 ? void 0 : traceExporterModule.OTLPTraceExporter) || !(resourcesModule === null || resourcesModule === void 0 ? void 0 : resourcesModule.Resource) || !(semanticModule === null || semanticModule === void 0 ? void 0 : semanticModule.SemanticResourceAttributes)) {
74
- throw new Error("OpenTelemetry packages are missing. Install '@opentelemetry/sdk-node', '@opentelemetry/exporter-trace-otlp-http', '@opentelemetry/resources' and '@opentelemetry/semantic-conventions'.");
75
- }
76
- const serviceName = options.serviceName ||
77
- Config_1.Config.get("application.serviceName") ||
78
- Config_1.Config.get("application.name") ||
79
- this.getEnv("SIGNOZ_SERVICE_NAME") ||
80
- this.getEnv("OTEL_SERVICE_NAME") ||
81
- "webframez-service";
82
- const environment = options.environment ||
83
- Config_1.Config.get("application.environment") ||
84
- this.getEnv("SIGNOZ_ENVIRONMENT") ||
85
- this.getEnv("NODE_ENV") ||
86
- "development";
87
- const traceEndpoint = this.ensureEndpoint(options.endpoint ||
88
- this.getEnv("SIGNOZ_ENDPOINT") ||
89
- this.getEnv("OTEL_EXPORTER_OTLP_TRACES_ENDPOINT") ||
90
- this.getEnv("OTEL_EXPORTER_OTLP_ENDPOINT"), "http://localhost:4318", "/v1/traces");
91
- const headers = Object.assign({}, (options.headers || {}));
92
- const apiKey = options.apiKey || this.getEnv("SIGNOZ_API_KEY");
93
- if (apiKey && !headers["signoz-access-token"]) {
94
- headers["signoz-access-token"] = apiKey;
95
- }
96
- const { NodeSDK } = sdkModule;
97
- const { OTLPTraceExporter } = traceExporterModule;
98
- const { Resource } = resourcesModule;
99
- const { SemanticResourceAttributes } = semanticModule;
100
- const resourceAttributes = {
101
- [SemanticResourceAttributes.SERVICE_NAME]: serviceName,
102
- [SemanticResourceAttributes.DEPLOYMENT_ENVIRONMENT]: environment,
103
- };
104
- if (options.resourceAttributes) {
105
- Object.assign(resourceAttributes, options.resourceAttributes);
106
- }
107
- const resource = new Resource(resourceAttributes);
108
- let instrumentations = options.instrumentations ? [...options.instrumentations] : [];
109
- if (instrumentations.length === 0 && options.autoInstrumentations !== false) {
110
- const autoModule = yield this.safeImport("@opentelemetry/auto-instrumentations-node");
111
- if (autoModule === null || autoModule === void 0 ? void 0 : autoModule.getNodeAutoInstrumentations) {
112
- instrumentations = [autoModule.getNodeAutoInstrumentations(options.autoInstrumentationConfig || {})];
113
- }
114
- else {
115
- this.warnMissingDependency("@opentelemetry/auto-instrumentations-node");
116
- }
117
- }
118
- let traceSampler;
119
- if (typeof options.samplingRatio === "number") {
120
- const samplerModule = yield this.safeImport("@opentelemetry/sdk-trace-base");
121
- if ((samplerModule === null || samplerModule === void 0 ? void 0 : samplerModule.ParentBasedSampler) && (samplerModule === null || samplerModule === void 0 ? void 0 : samplerModule.TraceIdRatioBasedSampler)) {
122
- const ratio = Math.min(Math.max(options.samplingRatio, 0), 1);
123
- traceSampler = new samplerModule.ParentBasedSampler({
124
- root: new samplerModule.TraceIdRatioBasedSampler(ratio),
125
- });
126
- }
127
- else {
128
- this.warnMissingDependency("@opentelemetry/sdk-trace-base");
129
- }
130
- }
131
- const traceExporter = new OTLPTraceExporter({
132
- url: traceEndpoint,
133
- headers,
134
- });
135
- const sdkOptions = {
136
- resource,
137
- traceExporter,
138
- };
139
- if (instrumentations && instrumentations.length > 0) {
140
- sdkOptions.instrumentations = instrumentations;
141
- }
142
- if (traceSampler) {
143
- sdkOptions.traceSampler = traceSampler;
144
- }
145
- this.sdk = new NodeSDK(sdkOptions);
146
- yield this.sdk.start();
147
- if (options.logInitialization !== false) {
148
- this.logInfo(`[SigNoz] Telemetry enabled (service="${serviceName}", endpoint="${traceEndpoint}")`);
149
- }
150
- this.registerShutdownHooks();
151
- });
152
- }
153
- static shutdown() {
154
- return __awaiter(this, void 0, void 0, function* () {
155
- if (!this.sdk) {
156
- return;
157
- }
158
- const sdkToShutdown = this.sdk;
159
- this.sdk = null;
160
- try {
161
- yield sdkToShutdown.shutdown();
162
- }
163
- catch (error) {
164
- this.logWarn("[SigNoz] Shutdown failed:", error);
165
- }
166
- });
167
- }
168
- static safeImport(moduleName) {
169
- return __awaiter(this, void 0, void 0, function* () {
170
- var _a;
171
- try {
172
- const module = yield (_a = moduleName, Promise.resolve().then(() => __importStar(require(_a))));
173
- return module;
174
- }
175
- catch (error) {
176
- if (error && (error.code === "MODULE_NOT_FOUND" || error.code === "ERR_MODULE_NOT_FOUND")) {
177
- return null;
178
- }
179
- throw error;
180
- }
181
- });
182
- }
183
- static ensureEndpoint(value, fallbackHost, defaultPath) {
184
- const base = value && value.trim() !== "" ? value.trim() : fallbackHost;
185
- if (base.includes("/v1/") || base.endsWith(defaultPath)) {
186
- return base;
187
- }
188
- return `${base.replace(/\/$/, "")}${defaultPath}`;
189
- }
190
- static warnMissingDependency(name) {
191
- if (this.missingDependencies.has(name)) {
192
- return;
193
- }
194
- this.missingDependencies.add(name);
195
- this.logWarn(`[SigNoz] Optional package "${name}" not found. Install it to enable the related feature.`);
196
- }
197
- static registerShutdownHooks() {
198
- if (this.shutdownRegistered) {
199
- return;
200
- }
201
- const nodeProcess = this.getProcess();
202
- if (!nodeProcess) {
203
- return;
204
- }
205
- nodeProcess.once("beforeExit", this.shutdownListener);
206
- nodeProcess.once("exit", this.shutdownListener);
207
- this.shutdownRegistered = true;
208
- }
209
- static getProcess() {
210
- if (typeof globalThis === "undefined") {
211
- return undefined;
212
- }
213
- const candidate = globalThis.process;
214
- if (candidate && typeof candidate.once === "function") {
215
- return candidate;
216
- }
217
- return undefined;
218
- }
219
- static getEnv(key) {
220
- const nodeProcess = this.getProcess();
221
- if (!nodeProcess || !nodeProcess.env) {
222
- return undefined;
223
- }
224
- const value = nodeProcess.env[key];
225
- return typeof value === "string" ? value : undefined;
226
- }
227
- static getConsole() {
228
- if (typeof globalThis === "undefined") {
229
- return undefined;
230
- }
231
- return globalThis.console;
232
- }
233
- static logInfo(...args) {
234
- const target = this.getConsole();
235
- if (target && typeof target.info === "function") {
236
- target.info(...args);
237
- }
238
- }
239
- static logWarn(...args) {
240
- const target = this.getConsole();
241
- if (target && typeof target.warn === "function") {
242
- target.warn(...args);
243
- }
244
- }
245
- }
246
- exports.SigNozTelemetry = SigNozTelemetry;
247
- SigNozTelemetry.sdk = null;
248
- SigNozTelemetry.initPromise = null;
249
- SigNozTelemetry.shutdownRegistered = false;
250
- SigNozTelemetry.missingDependencies = new Set();
251
- SigNozTelemetry.shutdownListener = () => {
252
- void SigNozTelemetry.shutdown();
253
- };
2
+ // import { NodeSDK } from "@opentelemetry/sdk-node";
3
+ // import { OTLPTraceExporter } from "@opentelemetry/exporter-trace-otlp-http";
4
+ // import { Resource } from "@opentelemetry/resources";
5
+ // import { SemanticResourceAttributes } from "@opentelemetry/semantic-conventions";
6
+ // import { ParentBasedSampler, TraceIdRatioBasedSampler } from "@opentelemetry/sdk-trace-base";
7
+ // import { Config } from "../Config";
8
+ // export interface SigNozOptions {
9
+ // enabled?: boolean;
10
+ // serviceName?: string;
11
+ // endpoint?: string;
12
+ // apiKey?: string;
13
+ // headers?: Record<string, string>;
14
+ // environment?: string;
15
+ // resourceAttributes?: Record<string, unknown>;
16
+ // samplingRatio?: number;
17
+ // instrumentations?: any[];
18
+ // autoInstrumentations?: boolean;
19
+ // autoInstrumentationConfig?: Record<string, unknown>;
20
+ // logInitialization?: boolean;
21
+ // }
22
+ // export class SigNozTelemetry {
23
+ // private static sdk: NodeSDK | null = null;
24
+ // private static initPromise: Promise<void> | null = null;
25
+ // private static shutdownRegistered = false;
26
+ // private static readonly missingDependencies = new Set<string>();
27
+ // private static readonly shutdownListener = () => {
28
+ // void SigNozTelemetry.shutdown();
29
+ // };
30
+ // static async init(options?: SigNozOptions): Promise<void> {
31
+ // if (!options || options.enabled === false) {
32
+ // return;
33
+ // }
34
+ // if (this.sdk) {
35
+ // return;
36
+ // }
37
+ // if (this.initPromise) {
38
+ // await this.initPromise;
39
+ // return;
40
+ // }
41
+ // console.log("signoz init 1");
42
+ // const initialization = (async () => {
43
+ // try {
44
+ // await this.initialize(options);
45
+ // } catch (error) {
46
+ // this.logWarn("[SigNoz] Initialization failed:", error);
47
+ // }
48
+ // })();
49
+ // console.log("signoz init 2");
50
+ // this.initPromise = initialization;
51
+ // try {
52
+ // await initialization;
53
+ // } finally {
54
+ // this.initPromise = null;
55
+ // }
56
+ // console.log("signoz init finish");
57
+ // }
58
+ // private static async initialize(options: SigNozOptions): Promise<void> {
59
+ // console.log("signoz initialize 1");
60
+ // const serviceName =
61
+ // options.serviceName ||
62
+ // (Config.get("application.serviceName") as string) ||
63
+ // (Config.get("application.name") as string) ||
64
+ // this.getEnv("SIGNOZ_SERVICE_NAME") ||
65
+ // this.getEnv("OTEL_SERVICE_NAME") ||
66
+ // "webframez-service";
67
+ // const environment =
68
+ // options.environment ||
69
+ // (Config.get("application.environment") as string) ||
70
+ // this.getEnv("SIGNOZ_ENVIRONMENT") ||
71
+ // this.getEnv("NODE_ENV") ||
72
+ // "development";
73
+ // const traceEndpoint = this.ensureEndpoint(
74
+ // options.endpoint ||
75
+ // this.getEnv("SIGNOZ_ENDPOINT") ||
76
+ // this.getEnv("OTEL_EXPORTER_OTLP_TRACES_ENDPOINT") ||
77
+ // this.getEnv("OTEL_EXPORTER_OTLP_ENDPOINT"),
78
+ // "http://localhost:4318",
79
+ // "/v1/traces"
80
+ // );
81
+ // console.log("signoz initialize 2");
82
+ // const headers = { ...(options.headers || {}) };
83
+ // const apiKey = options.apiKey || this.getEnv("SIGNOZ_API_KEY");
84
+ // if (apiKey && !headers["signoz-access-token"]) {
85
+ // headers["signoz-access-token"] = apiKey;
86
+ // }
87
+ // const resourceAttributes: Record<string, unknown> = {
88
+ // [SemanticResourceAttributes.SERVICE_NAME]: serviceName,
89
+ // [SemanticResourceAttributes.DEPLOYMENT_ENVIRONMENT]: environment,
90
+ // };
91
+ // if (options.resourceAttributes) {
92
+ // Object.assign(resourceAttributes, options.resourceAttributes);
93
+ // }
94
+ // console.log("signoz initialize 3");
95
+ // const resource = new Resource(resourceAttributes);
96
+ // let instrumentations = options.instrumentations ? [...options.instrumentations] : [];
97
+ // if (instrumentations.length === 0 && options.autoInstrumentations !== false) {
98
+ // const autoInstrumentation = this.loadAutoInstrumentations(options.autoInstrumentationConfig || {});
99
+ // if (autoInstrumentation) {
100
+ // instrumentations = [autoInstrumentation];
101
+ // }
102
+ // }
103
+ // console.log("signoz initialize 4");
104
+ // let traceSampler: ParentBasedSampler | undefined;
105
+ // if (typeof options.samplingRatio === "number") {
106
+ // const ratio = Math.min(Math.max(options.samplingRatio, 0), 1);
107
+ // traceSampler = new ParentBasedSampler({
108
+ // root: new TraceIdRatioBasedSampler(ratio),
109
+ // });
110
+ // }
111
+ // console.log("signoz initialize 5");
112
+ // const traceExporter = new OTLPTraceExporter({
113
+ // url: traceEndpoint,
114
+ // headers,
115
+ // });
116
+ // const sdkOptions: {
117
+ // resource: Resource;
118
+ // traceExporter: OTLPTraceExporter;
119
+ // instrumentations?: any[];
120
+ // traceSampler?: ParentBasedSampler;
121
+ // } = {
122
+ // resource,
123
+ // traceExporter,
124
+ // };
125
+ // if (instrumentations.length > 0) {
126
+ // sdkOptions.instrumentations = instrumentations;
127
+ // }
128
+ // if (traceSampler) {
129
+ // sdkOptions.traceSampler = traceSampler;
130
+ // }
131
+ // console.log("signoz initialize 6");
132
+ // this.sdk = new NodeSDK(sdkOptions as any);
133
+ // await this.sdk.start();
134
+ // if (options.logInitialization !== false) {
135
+ // this.logInfo(`[SigNoz] Telemetry enabled (service="${serviceName}", endpoint="${traceEndpoint}")`);
136
+ // }
137
+ // console.log("signoz initialize 7");
138
+ // this.registerShutdownHooks();
139
+ // console.log("signoz initialize 8");
140
+ // }
141
+ // static async shutdown(): Promise<void> {
142
+ // if (!this.sdk) {
143
+ // return;
144
+ // }
145
+ // const sdkToShutdown = this.sdk;
146
+ // this.sdk = null;
147
+ // try {
148
+ // await sdkToShutdown.shutdown();
149
+ // } catch (error) {
150
+ // this.logWarn("[SigNoz] Shutdown failed:", error);
151
+ // }
152
+ // }
153
+ // private static ensureEndpoint(value: string | undefined, fallbackHost: string, defaultPath: string): string {
154
+ // const base = value && value.trim() !== "" ? value.trim() : fallbackHost;
155
+ // if (base.includes("/v1/") || base.endsWith(defaultPath)) {
156
+ // return base;
157
+ // }
158
+ // return `${base.replace(/\/$/, "")}${defaultPath}`;
159
+ // }
160
+ // private static warnMissingDependency(name: string) {
161
+ // if (this.missingDependencies.has(name)) {
162
+ // return;
163
+ // }
164
+ // this.missingDependencies.add(name);
165
+ // this.logWarn(`[SigNoz] Optional package "${name}" not found. Install it to enable the related feature.`);
166
+ // }
167
+ // private static loadAutoInstrumentations(config: Record<string, unknown>): any | null {
168
+ // if (typeof require !== "function") {
169
+ // return null;
170
+ // }
171
+ // try {
172
+ // // eslint-disable-next-line @typescript-eslint/no-var-requires,@typescript-eslint/no-unsafe-assignment
173
+ // const module = require("@opentelemetry/auto-instrumentations-node");
174
+ // if (module && typeof module.getNodeAutoInstrumentations === "function") {
175
+ // return module.getNodeAutoInstrumentations(config);
176
+ // }
177
+ // this.warnMissingDependency("@opentelemetry/auto-instrumentations-node");
178
+ // return null;
179
+ // } catch (error: any) {
180
+ // if (error && (error.code === "MODULE_NOT_FOUND" || error.code === "ERR_MODULE_NOT_FOUND")) {
181
+ // this.warnMissingDependency("@opentelemetry/auto-instrumentations-node");
182
+ // return null;
183
+ // }
184
+ // throw error;
185
+ // }
186
+ // }
187
+ // private static registerShutdownHooks() {
188
+ // if (this.shutdownRegistered) {
189
+ // return;
190
+ // }
191
+ // const nodeProcess = this.getProcess();
192
+ // if (!nodeProcess) {
193
+ // return;
194
+ // }
195
+ // nodeProcess.once("beforeExit", this.shutdownListener);
196
+ // nodeProcess.once("exit", this.shutdownListener);
197
+ // this.shutdownRegistered = true;
198
+ // }
199
+ // private static getProcess(): any {
200
+ // if (typeof globalThis === "undefined") {
201
+ // return undefined;
202
+ // }
203
+ // const candidate = (globalThis as any).process;
204
+ // if (candidate && typeof candidate.once === "function") {
205
+ // return candidate;
206
+ // }
207
+ // return undefined;
208
+ // }
209
+ // private static getEnv(key: string): string | undefined {
210
+ // const nodeProcess = this.getProcess();
211
+ // if (!nodeProcess || !nodeProcess.env) {
212
+ // return undefined;
213
+ // }
214
+ // const value = nodeProcess.env[key];
215
+ // return typeof value === "string" ? value : undefined;
216
+ // }
217
+ // private static getConsole(): any {
218
+ // if (typeof globalThis === "undefined") {
219
+ // return undefined;
220
+ // }
221
+ // return (globalThis as any).console;
222
+ // }
223
+ // private static logInfo(...args: unknown[]) {
224
+ // const target = this.getConsole();
225
+ // if (target && typeof target.info === "function") {
226
+ // target.info(...args);
227
+ // }
228
+ // }
229
+ // private static logWarn(...args: unknown[]) {
230
+ // const target = this.getConsole();
231
+ // if (target && typeof target.warn === "function") {
232
+ // target.warn(...args);
233
+ // }
234
+ // }
235
+ // }
@@ -11,7 +11,7 @@ const Router_1 = require("./Router/Router");
11
11
  const QueueJobsRegisty_1 = require("./Queue/QueueJobsRegisty");
12
12
  const DatatableRegistry_1 = require("./Datatable/DatatableRegistry");
13
13
  const ModulesLoader_1 = require("./Modules/ModulesLoader");
14
- const SigNozTelemetry_1 = require("./Telemetry/SigNozTelemetry");
14
+ // import { SigNozTelemetry } from "./Telemetry/SigNozTelemetry";
15
15
  class WebApplication {
16
16
  constructor() {
17
17
  this.modulesLoader = null;
@@ -25,9 +25,9 @@ class WebApplication {
25
25
  Config_1.Config.register(key, options.config[key]);
26
26
  }
27
27
  }
28
- if (options && options.signoz) {
29
- void SigNozTelemetry_1.SigNozTelemetry.init(options.signoz);
30
- }
28
+ // if (options && options.signoz) {
29
+ // void SigNozTelemetry.init(options.signoz);
30
+ // }
31
31
  this.modulesLoader = new ModulesLoader_1.ModulesLoader();
32
32
  this.modulesLoader.load(options && options.modules ? options.modules : []);
33
33
  if (options && options.kernel) {
@@ -51,9 +51,9 @@ class WebApplication {
51
51
  this.server = http_1.default.createServer((req, res) => {
52
52
  Router_1.Router.handleRequest(req, res);
53
53
  });
54
- this.server.on("close", () => {
55
- void SigNozTelemetry_1.SigNozTelemetry.shutdown();
56
- });
54
+ // this.server.on("close", () => {
55
+ // void SigNozTelemetry.shutdown();
56
+ // });
57
57
  this.server.listen(port, () => {
58
58
  const runtimeConsole = typeof globalThis !== "undefined" ? globalThis.console : undefined;
59
59
  if (runtimeConsole && typeof runtimeConsole.log === "function") {
package/dist/index.d.ts CHANGED
@@ -31,5 +31,3 @@ export * from "./Queue/QueueJob";
31
31
  export * from "./Queue/QueueJobsRegisty";
32
32
  export * from "./Commands/ConsoleOutputHelper";
33
33
  export * from "./Modules/ModuleProvider";
34
- export * from "./Telemetry/SigNozTelemetry";
35
- export * from "./info";
package/dist/index.js CHANGED
@@ -47,5 +47,5 @@ __exportStar(require("./Queue/QueueJob"), exports);
47
47
  __exportStar(require("./Queue/QueueJobsRegisty"), exports);
48
48
  __exportStar(require("./Commands/ConsoleOutputHelper"), exports);
49
49
  __exportStar(require("./Modules/ModuleProvider"), exports);
50
- __exportStar(require("./Telemetry/SigNozTelemetry"), exports);
51
- __exportStar(require("./info"), exports);
50
+ // export * from "./Telemetry/SigNozTelemetry";
51
+ // export * from "./info";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webtypen/webframez-core",
3
- "version": "0.3.15",
3
+ "version": "0.3.16",
4
4
  "description": "The core package of the typescript based webframez (web-framework) by webtypen.de",
5
5
  "homepage": "https://webtypen.de/",
6
6
  "license": "MIT",
@@ -11,7 +11,6 @@ import { QueueStopCommand } from "./Commands/QueueStopCommand";
11
11
  import { QueueLogCommand } from "./Commands/QueueLogCommand";
12
12
  import { QueueWorkerAutorestartCommand } from "./Commands/QueueWorkerAutorestartCommand";
13
13
  import { WebframezInfo } from "./info";
14
- import { SigNozTelemetry } from "./Telemetry/SigNozTelemetry";
15
14
 
16
15
  export class ConsoleApplication {
17
16
  systemCommands: any = [
@@ -34,9 +33,9 @@ export class ConsoleApplication {
34
33
  }
35
34
  }
36
35
 
37
- if (options && options.signoz) {
38
- void SigNozTelemetry.init(options.signoz);
39
- }
36
+ // if (options && options.signoz) {
37
+ // void SigNozTelemetry.init(options.signoz);
38
+ // }
40
39
 
41
40
  if (options && options.datatables) {
42
41
  DatatableRegistry.registerMany(options.datatables);
@@ -1,260 +1,268 @@
1
- import { Config } from "../Config";
2
-
3
- export interface SigNozOptions {
4
- enabled?: boolean;
5
- serviceName?: string;
6
- endpoint?: string;
7
- apiKey?: string;
8
- headers?: Record<string, string>;
9
- environment?: string;
10
- resourceAttributes?: Record<string, unknown>;
11
- samplingRatio?: number;
12
- instrumentations?: any[];
13
- autoInstrumentations?: boolean;
14
- autoInstrumentationConfig?: Record<string, unknown>;
15
- logInitialization?: boolean;
16
- }
17
-
18
- export class SigNozTelemetry {
19
- private static sdk: any = null;
20
- private static initPromise: Promise<void> | null = null;
21
- private static shutdownRegistered = false;
22
- private static readonly missingDependencies = new Set<string>();
23
- private static readonly shutdownListener = () => {
24
- void SigNozTelemetry.shutdown();
25
- };
26
-
27
- static async init(options?: SigNozOptions): Promise<void> {
28
- if (!options || options.enabled === false) {
29
- return;
30
- }
31
- if (this.sdk) {
32
- return;
33
- }
34
- if (this.initPromise) {
35
- await this.initPromise;
36
- return;
37
- }
38
-
39
- const initialization = (async () => {
40
- try {
41
- await this.initialize(options);
42
- } catch (error) {
43
- this.logWarn("[SigNoz] Initialization failed:", error);
44
- }
45
- })();
46
-
47
- this.initPromise = initialization;
48
-
49
- try {
50
- await initialization;
51
- } finally {
52
- this.initPromise = null;
53
- }
54
- }
55
-
56
- private static async initialize(options: SigNozOptions): Promise<void> {
57
- const sdkModule = await this.safeImport<any>("@opentelemetry/sdk-node");
58
- const traceExporterModule = await this.safeImport<any>("@opentelemetry/exporter-trace-otlp-http");
59
- const resourcesModule = await this.safeImport<any>("@opentelemetry/resources");
60
- const semanticModule = await this.safeImport<any>("@opentelemetry/semantic-conventions");
61
-
62
- if (!sdkModule?.NodeSDK || !traceExporterModule?.OTLPTraceExporter || !resourcesModule?.Resource || !semanticModule?.SemanticResourceAttributes) {
63
- throw new Error(
64
- "OpenTelemetry packages are missing. Install '@opentelemetry/sdk-node', '@opentelemetry/exporter-trace-otlp-http', '@opentelemetry/resources' and '@opentelemetry/semantic-conventions'."
65
- );
66
- }
67
-
68
- const serviceName =
69
- options.serviceName ||
70
- (Config.get("application.serviceName") as string) ||
71
- (Config.get("application.name") as string) ||
72
- this.getEnv("SIGNOZ_SERVICE_NAME") ||
73
- this.getEnv("OTEL_SERVICE_NAME") ||
74
- "webframez-service";
75
-
76
- const environment =
77
- options.environment ||
78
- (Config.get("application.environment") as string) ||
79
- this.getEnv("SIGNOZ_ENVIRONMENT") ||
80
- this.getEnv("NODE_ENV") ||
81
- "development";
82
-
83
- const traceEndpoint = this.ensureEndpoint(
84
- options.endpoint ||
85
- this.getEnv("SIGNOZ_ENDPOINT") ||
86
- this.getEnv("OTEL_EXPORTER_OTLP_TRACES_ENDPOINT") ||
87
- this.getEnv("OTEL_EXPORTER_OTLP_ENDPOINT"),
88
- "http://localhost:4318",
89
- "/v1/traces"
90
- );
91
-
92
- const headers = { ...(options.headers || {}) };
93
- const apiKey = options.apiKey || this.getEnv("SIGNOZ_API_KEY");
94
- if (apiKey && !headers["signoz-access-token"]) {
95
- headers["signoz-access-token"] = apiKey;
96
- }
97
-
98
- const { NodeSDK } = sdkModule;
99
- const { OTLPTraceExporter } = traceExporterModule;
100
- const { Resource } = resourcesModule;
101
- const { SemanticResourceAttributes } = semanticModule;
102
-
103
- const resourceAttributes: Record<string, unknown> = {
104
- [SemanticResourceAttributes.SERVICE_NAME]: serviceName,
105
- [SemanticResourceAttributes.DEPLOYMENT_ENVIRONMENT]: environment,
106
- };
107
-
108
- if (options.resourceAttributes) {
109
- Object.assign(resourceAttributes, options.resourceAttributes);
110
- }
111
-
112
- const resource = new Resource(resourceAttributes);
113
-
114
- let instrumentations = options.instrumentations ? [...options.instrumentations] : [];
115
- if (instrumentations.length === 0 && options.autoInstrumentations !== false) {
116
- const autoModule = await this.safeImport<any>("@opentelemetry/auto-instrumentations-node");
117
- if (autoModule?.getNodeAutoInstrumentations) {
118
- instrumentations = [autoModule.getNodeAutoInstrumentations(options.autoInstrumentationConfig || {})];
119
- } else {
120
- this.warnMissingDependency("@opentelemetry/auto-instrumentations-node");
121
- }
122
- }
123
-
124
- let traceSampler: any;
125
- if (typeof options.samplingRatio === "number") {
126
- const samplerModule = await this.safeImport<any>("@opentelemetry/sdk-trace-base");
127
- if (samplerModule?.ParentBasedSampler && samplerModule?.TraceIdRatioBasedSampler) {
128
- const ratio = Math.min(Math.max(options.samplingRatio, 0), 1);
129
- traceSampler = new samplerModule.ParentBasedSampler({
130
- root: new samplerModule.TraceIdRatioBasedSampler(ratio),
131
- });
132
- } else {
133
- this.warnMissingDependency("@opentelemetry/sdk-trace-base");
134
- }
135
- }
136
-
137
- const traceExporter = new OTLPTraceExporter({
138
- url: traceEndpoint,
139
- headers,
140
- });
141
-
142
- const sdkOptions: any = {
143
- resource,
144
- traceExporter,
145
- };
146
-
147
- if (instrumentations && instrumentations.length > 0) {
148
- sdkOptions.instrumentations = instrumentations;
149
- }
150
- if (traceSampler) {
151
- sdkOptions.traceSampler = traceSampler;
152
- }
153
-
154
- this.sdk = new NodeSDK(sdkOptions);
155
- await this.sdk.start();
156
-
157
- if (options.logInitialization !== false) {
158
- this.logInfo(`[SigNoz] Telemetry enabled (service="${serviceName}", endpoint="${traceEndpoint}")`);
159
- }
160
-
161
- this.registerShutdownHooks();
162
- }
163
-
164
- static async shutdown(): Promise<void> {
165
- if (!this.sdk) {
166
- return;
167
- }
168
-
169
- const sdkToShutdown = this.sdk;
170
- this.sdk = null;
171
-
172
- try {
173
- await sdkToShutdown.shutdown();
174
- } catch (error) {
175
- this.logWarn("[SigNoz] Shutdown failed:", error);
176
- }
177
- }
178
-
179
- private static async safeImport<T = any>(moduleName: string): Promise<T | null> {
180
- try {
181
- const module = await import(moduleName);
182
- return module as T;
183
- } catch (error: any) {
184
- if (error && (error.code === "MODULE_NOT_FOUND" || error.code === "ERR_MODULE_NOT_FOUND")) {
185
- return null;
186
- }
187
- throw error;
188
- }
189
- }
190
-
191
- private static ensureEndpoint(value: string | undefined, fallbackHost: string, defaultPath: string): string {
192
- const base = value && value.trim() !== "" ? value.trim() : fallbackHost;
193
- if (base.includes("/v1/") || base.endsWith(defaultPath)) {
194
- return base;
195
- }
196
- return `${base.replace(/\/$/, "")}${defaultPath}`;
197
- }
198
-
199
- private static warnMissingDependency(name: string) {
200
- if (this.missingDependencies.has(name)) {
201
- return;
202
- }
203
- this.missingDependencies.add(name);
204
- this.logWarn(`[SigNoz] Optional package "${name}" not found. Install it to enable the related feature.`);
205
- }
206
-
207
- private static registerShutdownHooks() {
208
- if (this.shutdownRegistered) {
209
- return;
210
- }
211
- const nodeProcess = this.getProcess();
212
- if (!nodeProcess) {
213
- return;
214
- }
215
- nodeProcess.once("beforeExit", this.shutdownListener);
216
- nodeProcess.once("exit", this.shutdownListener);
217
- this.shutdownRegistered = true;
218
- }
219
-
220
- private static getProcess(): any {
221
- if (typeof globalThis === "undefined") {
222
- return undefined;
223
- }
224
- const candidate = (globalThis as any).process;
225
- if (candidate && typeof candidate.once === "function") {
226
- return candidate;
227
- }
228
- return undefined;
229
- }
230
-
231
- private static getEnv(key: string): string | undefined {
232
- const nodeProcess = this.getProcess();
233
- if (!nodeProcess || !nodeProcess.env) {
234
- return undefined;
235
- }
236
- const value = nodeProcess.env[key];
237
- return typeof value === "string" ? value : undefined;
238
- }
239
-
240
- private static getConsole(): any {
241
- if (typeof globalThis === "undefined") {
242
- return undefined;
243
- }
244
- return (globalThis as any).console;
245
- }
246
-
247
- private static logInfo(...args: unknown[]) {
248
- const target = this.getConsole();
249
- if (target && typeof target.info === "function") {
250
- target.info(...args);
251
- }
252
- }
253
-
254
- private static logWarn(...args: unknown[]) {
255
- const target = this.getConsole();
256
- if (target && typeof target.warn === "function") {
257
- target.warn(...args);
258
- }
259
- }
260
- }
1
+ // import { NodeSDK } from "@opentelemetry/sdk-node";
2
+ // import { OTLPTraceExporter } from "@opentelemetry/exporter-trace-otlp-http";
3
+ // import { Resource } from "@opentelemetry/resources";
4
+ // import { SemanticResourceAttributes } from "@opentelemetry/semantic-conventions";
5
+ // import { ParentBasedSampler, TraceIdRatioBasedSampler } from "@opentelemetry/sdk-trace-base";
6
+ // import { Config } from "../Config";
7
+
8
+ // export interface SigNozOptions {
9
+ // enabled?: boolean;
10
+ // serviceName?: string;
11
+ // endpoint?: string;
12
+ // apiKey?: string;
13
+ // headers?: Record<string, string>;
14
+ // environment?: string;
15
+ // resourceAttributes?: Record<string, unknown>;
16
+ // samplingRatio?: number;
17
+ // instrumentations?: any[];
18
+ // autoInstrumentations?: boolean;
19
+ // autoInstrumentationConfig?: Record<string, unknown>;
20
+ // logInitialization?: boolean;
21
+ // }
22
+
23
+ // export class SigNozTelemetry {
24
+ // private static sdk: NodeSDK | null = null;
25
+ // private static initPromise: Promise<void> | null = null;
26
+ // private static shutdownRegistered = false;
27
+ // private static readonly missingDependencies = new Set<string>();
28
+ // private static readonly shutdownListener = () => {
29
+ // void SigNozTelemetry.shutdown();
30
+ // };
31
+
32
+ // static async init(options?: SigNozOptions): Promise<void> {
33
+ // if (!options || options.enabled === false) {
34
+ // return;
35
+ // }
36
+ // if (this.sdk) {
37
+ // return;
38
+ // }
39
+ // if (this.initPromise) {
40
+ // await this.initPromise;
41
+ // return;
42
+ // }
43
+
44
+ // console.log("signoz init 1");
45
+ // const initialization = (async () => {
46
+ // try {
47
+ // await this.initialize(options);
48
+ // } catch (error) {
49
+ // this.logWarn("[SigNoz] Initialization failed:", error);
50
+ // }
51
+ // })();
52
+ // console.log("signoz init 2");
53
+
54
+ // this.initPromise = initialization;
55
+
56
+ // try {
57
+ // await initialization;
58
+ // } finally {
59
+ // this.initPromise = null;
60
+ // }
61
+ // console.log("signoz init finish");
62
+ // }
63
+
64
+ // private static async initialize(options: SigNozOptions): Promise<void> {
65
+ // console.log("signoz initialize 1");
66
+ // const serviceName =
67
+ // options.serviceName ||
68
+ // (Config.get("application.serviceName") as string) ||
69
+ // (Config.get("application.name") as string) ||
70
+ // this.getEnv("SIGNOZ_SERVICE_NAME") ||
71
+ // this.getEnv("OTEL_SERVICE_NAME") ||
72
+ // "webframez-service";
73
+
74
+ // const environment =
75
+ // options.environment ||
76
+ // (Config.get("application.environment") as string) ||
77
+ // this.getEnv("SIGNOZ_ENVIRONMENT") ||
78
+ // this.getEnv("NODE_ENV") ||
79
+ // "development";
80
+
81
+ // const traceEndpoint = this.ensureEndpoint(
82
+ // options.endpoint ||
83
+ // this.getEnv("SIGNOZ_ENDPOINT") ||
84
+ // this.getEnv("OTEL_EXPORTER_OTLP_TRACES_ENDPOINT") ||
85
+ // this.getEnv("OTEL_EXPORTER_OTLP_ENDPOINT"),
86
+ // "http://localhost:4318",
87
+ // "/v1/traces"
88
+ // );
89
+ // console.log("signoz initialize 2");
90
+
91
+ // const headers = { ...(options.headers || {}) };
92
+ // const apiKey = options.apiKey || this.getEnv("SIGNOZ_API_KEY");
93
+ // if (apiKey && !headers["signoz-access-token"]) {
94
+ // headers["signoz-access-token"] = apiKey;
95
+ // }
96
+
97
+ // const resourceAttributes: Record<string, unknown> = {
98
+ // [SemanticResourceAttributes.SERVICE_NAME]: serviceName,
99
+ // [SemanticResourceAttributes.DEPLOYMENT_ENVIRONMENT]: environment,
100
+ // };
101
+
102
+ // if (options.resourceAttributes) {
103
+ // Object.assign(resourceAttributes, options.resourceAttributes);
104
+ // }
105
+
106
+ // console.log("signoz initialize 3");
107
+ // const resource = new Resource(resourceAttributes);
108
+
109
+ // let instrumentations = options.instrumentations ? [...options.instrumentations] : [];
110
+ // if (instrumentations.length === 0 && options.autoInstrumentations !== false) {
111
+ // const autoInstrumentation = this.loadAutoInstrumentations(options.autoInstrumentationConfig || {});
112
+ // if (autoInstrumentation) {
113
+ // instrumentations = [autoInstrumentation];
114
+ // }
115
+ // }
116
+ // console.log("signoz initialize 4");
117
+
118
+ // let traceSampler: ParentBasedSampler | undefined;
119
+ // if (typeof options.samplingRatio === "number") {
120
+ // const ratio = Math.min(Math.max(options.samplingRatio, 0), 1);
121
+ // traceSampler = new ParentBasedSampler({
122
+ // root: new TraceIdRatioBasedSampler(ratio),
123
+ // });
124
+ // }
125
+ // console.log("signoz initialize 5");
126
+
127
+ // const traceExporter = new OTLPTraceExporter({
128
+ // url: traceEndpoint,
129
+ // headers,
130
+ // });
131
+
132
+ // const sdkOptions: {
133
+ // resource: Resource;
134
+ // traceExporter: OTLPTraceExporter;
135
+ // instrumentations?: any[];
136
+ // traceSampler?: ParentBasedSampler;
137
+ // } = {
138
+ // resource,
139
+ // traceExporter,
140
+ // };
141
+
142
+ // if (instrumentations.length > 0) {
143
+ // sdkOptions.instrumentations = instrumentations;
144
+ // }
145
+ // if (traceSampler) {
146
+ // sdkOptions.traceSampler = traceSampler;
147
+ // }
148
+
149
+ // console.log("signoz initialize 6");
150
+ // this.sdk = new NodeSDK(sdkOptions as any);
151
+ // await this.sdk.start();
152
+
153
+ // if (options.logInitialization !== false) {
154
+ // this.logInfo(`[SigNoz] Telemetry enabled (service="${serviceName}", endpoint="${traceEndpoint}")`);
155
+ // }
156
+
157
+ // console.log("signoz initialize 7");
158
+ // this.registerShutdownHooks();
159
+
160
+ // console.log("signoz initialize 8");
161
+ // }
162
+
163
+ // static async shutdown(): Promise<void> {
164
+ // if (!this.sdk) {
165
+ // return;
166
+ // }
167
+
168
+ // const sdkToShutdown = this.sdk;
169
+ // this.sdk = null;
170
+
171
+ // try {
172
+ // await sdkToShutdown.shutdown();
173
+ // } catch (error) {
174
+ // this.logWarn("[SigNoz] Shutdown failed:", error);
175
+ // }
176
+ // }
177
+
178
+ // private static ensureEndpoint(value: string | undefined, fallbackHost: string, defaultPath: string): string {
179
+ // const base = value && value.trim() !== "" ? value.trim() : fallbackHost;
180
+ // if (base.includes("/v1/") || base.endsWith(defaultPath)) {
181
+ // return base;
182
+ // }
183
+ // return `${base.replace(/\/$/, "")}${defaultPath}`;
184
+ // }
185
+
186
+ // private static warnMissingDependency(name: string) {
187
+ // if (this.missingDependencies.has(name)) {
188
+ // return;
189
+ // }
190
+ // this.missingDependencies.add(name);
191
+ // this.logWarn(`[SigNoz] Optional package "${name}" not found. Install it to enable the related feature.`);
192
+ // }
193
+
194
+ // private static loadAutoInstrumentations(config: Record<string, unknown>): any | null {
195
+ // if (typeof require !== "function") {
196
+ // return null;
197
+ // }
198
+ // try {
199
+ // // eslint-disable-next-line @typescript-eslint/no-var-requires,@typescript-eslint/no-unsafe-assignment
200
+ // const module = require("@opentelemetry/auto-instrumentations-node");
201
+ // if (module && typeof module.getNodeAutoInstrumentations === "function") {
202
+ // return module.getNodeAutoInstrumentations(config);
203
+ // }
204
+ // this.warnMissingDependency("@opentelemetry/auto-instrumentations-node");
205
+ // return null;
206
+ // } catch (error: any) {
207
+ // if (error && (error.code === "MODULE_NOT_FOUND" || error.code === "ERR_MODULE_NOT_FOUND")) {
208
+ // this.warnMissingDependency("@opentelemetry/auto-instrumentations-node");
209
+ // return null;
210
+ // }
211
+ // throw error;
212
+ // }
213
+ // }
214
+
215
+ // private static registerShutdownHooks() {
216
+ // if (this.shutdownRegistered) {
217
+ // return;
218
+ // }
219
+ // const nodeProcess = this.getProcess();
220
+ // if (!nodeProcess) {
221
+ // return;
222
+ // }
223
+ // nodeProcess.once("beforeExit", this.shutdownListener);
224
+ // nodeProcess.once("exit", this.shutdownListener);
225
+ // this.shutdownRegistered = true;
226
+ // }
227
+
228
+ // private static getProcess(): any {
229
+ // if (typeof globalThis === "undefined") {
230
+ // return undefined;
231
+ // }
232
+ // const candidate = (globalThis as any).process;
233
+ // if (candidate && typeof candidate.once === "function") {
234
+ // return candidate;
235
+ // }
236
+ // return undefined;
237
+ // }
238
+
239
+ // private static getEnv(key: string): string | undefined {
240
+ // const nodeProcess = this.getProcess();
241
+ // if (!nodeProcess || !nodeProcess.env) {
242
+ // return undefined;
243
+ // }
244
+ // const value = nodeProcess.env[key];
245
+ // return typeof value === "string" ? value : undefined;
246
+ // }
247
+
248
+ // private static getConsole(): any {
249
+ // if (typeof globalThis === "undefined") {
250
+ // return undefined;
251
+ // }
252
+ // return (globalThis as any).console;
253
+ // }
254
+
255
+ // private static logInfo(...args: unknown[]) {
256
+ // const target = this.getConsole();
257
+ // if (target && typeof target.info === "function") {
258
+ // target.info(...args);
259
+ // }
260
+ // }
261
+
262
+ // private static logWarn(...args: unknown[]) {
263
+ // const target = this.getConsole();
264
+ // if (target && typeof target.warn === "function") {
265
+ // target.warn(...args);
266
+ // }
267
+ // }
268
+ // }
@@ -5,7 +5,7 @@ import { Router } from "./Router/Router";
5
5
  import { QueueJobsRegisty } from "./Queue/QueueJobsRegisty";
6
6
  import { DatatableRegistry } from "./Datatable/DatatableRegistry";
7
7
  import { ModulesLoader } from "./Modules/ModulesLoader";
8
- import { SigNozTelemetry } from "./Telemetry/SigNozTelemetry";
8
+ // import { SigNozTelemetry } from "./Telemetry/SigNozTelemetry";
9
9
 
10
10
  export class WebApplication {
11
11
  private server!: Server;
@@ -21,9 +21,9 @@ export class WebApplication {
21
21
  }
22
22
  }
23
23
 
24
- if (options && options.signoz) {
25
- void SigNozTelemetry.init(options.signoz);
26
- }
24
+ // if (options && options.signoz) {
25
+ // void SigNozTelemetry.init(options.signoz);
26
+ // }
27
27
 
28
28
  this.modulesLoader = new ModulesLoader();
29
29
  this.modulesLoader.load(options && options.modules ? options.modules : []);
@@ -55,9 +55,9 @@ export class WebApplication {
55
55
  Router.handleRequest(req, res);
56
56
  });
57
57
 
58
- this.server.on("close", () => {
59
- void SigNozTelemetry.shutdown();
60
- });
58
+ // this.server.on("close", () => {
59
+ // void SigNozTelemetry.shutdown();
60
+ // });
61
61
 
62
62
  this.server.listen(port, () => {
63
63
  const runtimeConsole = typeof globalThis !== "undefined" ? (globalThis as any).console : undefined;
package/src/index.ts CHANGED
@@ -31,5 +31,5 @@ export * from "./Queue/QueueJob";
31
31
  export * from "./Queue/QueueJobsRegisty";
32
32
  export * from "./Commands/ConsoleOutputHelper";
33
33
  export * from "./Modules/ModuleProvider";
34
- export * from "./Telemetry/SigNozTelemetry";
35
- export * from "./info";
34
+ // export * from "./Telemetry/SigNozTelemetry";
35
+ // export * from "./info";