@dex-monit/observability-sdk-node 1.0.13 → 1.0.14
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/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -1
- package/dist/lib/console-capture.d.ts +1 -1
- package/dist/lib/console-capture.d.ts.map +1 -1
- package/dist/lib/console-capture.js +8 -3
- package/dist/lib/dex-logger.service.d.ts +1 -1
- package/dist/lib/dex-logger.service.d.ts.map +1 -1
- package/dist/lib/dex-logger.service.js +12 -9
- package/dist/lib/error-capture.interceptor.d.ts +1 -1
- package/dist/lib/error-capture.interceptor.d.ts.map +1 -1
- package/dist/lib/error-capture.interceptor.js +14 -11
- package/dist/lib/global-exception.filter.d.ts +1 -1
- package/dist/lib/global-exception.filter.d.ts.map +1 -1
- package/dist/lib/global-exception.filter.js +13 -10
- package/dist/lib/http-interceptor.d.ts +1 -1
- package/dist/lib/http-interceptor.d.ts.map +1 -1
- package/dist/lib/http-interceptor.js +29 -21
- package/dist/lib/monitoring-client.js +34 -23
- package/dist/lib/nest-logger-capture.d.ts +1 -1
- package/dist/lib/nest-logger-capture.d.ts.map +1 -1
- package/dist/lib/nest-logger-capture.js +23 -18
- package/dist/lib/remote-logger.d.ts +1 -1
- package/dist/lib/remote-logger.d.ts.map +1 -1
- package/dist/lib/remote-logger.js +8 -3
- package/dist/lib/request-id.middleware.js +18 -15
- package/dist/lib/sdk-node.d.ts +10 -10
- package/dist/lib/sdk-node.d.ts.map +1 -1
- package/dist/lib/sdk-node.js +13 -10
- package/dist/lib/sdk-node.module.d.ts +1 -1
- package/dist/lib/sdk-node.module.d.ts.map +1 -1
- package/dist/lib/sdk-node.module.js +54 -52
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/package.json +2 -4
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './lib/sdk-node
|
|
1
|
+
export * from './lib/sdk-node';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"console-capture.d.ts","sourceRoot":"","sources":["../../src/lib/console-capture.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"console-capture.d.ts","sourceRoot":"","sources":["../../src/lib/console-capture.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAyBvD;;;;;GAKG;AACH,wBAAgB,mBAAmB,CACjC,gBAAgB,EAAE,gBAAgB,EAClC,OAAO,GAAE;IAAE,cAAc,CAAC,EAAE,OAAO,CAAA;CAAO,GACzC,IAAI,CA2CN;AAyCD;;GAEG;AACH,wBAAgB,kBAAkB,IAAI,IAAI,CAczC;AAqBD;;GAEG;AACH,wBAAgB,sBAAsB,IAAI,OAAO,CAEhD"}
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.startConsoleCapture = startConsoleCapture;
|
|
4
|
+
exports.stopConsoleCapture = stopConsoleCapture;
|
|
5
|
+
exports.isConsoleCaptureActive = isConsoleCaptureActive;
|
|
1
6
|
const CONSOLE_TO_SEVERITY = {
|
|
2
7
|
debug: 'debug',
|
|
3
8
|
log: 'info',
|
|
@@ -14,7 +19,7 @@ let skipNestLogs = false;
|
|
|
14
19
|
* @param options - Options for console capture
|
|
15
20
|
* @param options.skipNestJsLogs - Skip logs that appear to come from NestJS Logger (to avoid duplicates)
|
|
16
21
|
*/
|
|
17
|
-
|
|
22
|
+
function startConsoleCapture(monitoringClient, options = {}) {
|
|
18
23
|
if (isCapturing) {
|
|
19
24
|
return;
|
|
20
25
|
}
|
|
@@ -87,7 +92,7 @@ function shouldSkipLog(message) {
|
|
|
87
92
|
/**
|
|
88
93
|
* Stop capturing console output
|
|
89
94
|
*/
|
|
90
|
-
|
|
95
|
+
function stopConsoleCapture() {
|
|
91
96
|
if (!isCapturing || !originalMethods) {
|
|
92
97
|
return;
|
|
93
98
|
}
|
|
@@ -122,6 +127,6 @@ function formatConsoleArgs(args) {
|
|
|
122
127
|
/**
|
|
123
128
|
* Check if console capture is active
|
|
124
129
|
*/
|
|
125
|
-
|
|
130
|
+
function isConsoleCaptureActive() {
|
|
126
131
|
return isCapturing;
|
|
127
132
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dex-logger.service.d.ts","sourceRoot":"","sources":["../../src/lib/dex-logger.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,aAAa,EAAS,MAAM,gBAAgB,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"dex-logger.service.d.ts","sourceRoot":"","sources":["../../src/lib/dex-logger.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,aAAa,EAAS,MAAM,gBAAgB,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAIvD;;GAEG;AACH,eAAO,MAAM,gBAAgB,uBAAuB,CAAC;AAErD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,qBACa,gBAAiB,YAAW,aAAa;IACpD,OAAO,CAAC,OAAO,CAAC,CAAS;IACzB,OAAO,CAAC,gBAAgB,CAAC,CAAmB;IAE5C;;OAEG;IACH,mBAAmB,CAAC,MAAM,CAAC,EAAE,gBAAgB,GAAG,IAAI;IAIpD;;OAEG;IACH,UAAU,CAAC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AQtB;;OAEG;IACH,OAAO,CAAC,kBAAkB;CA4B3B"}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DexLoggerService = exports.DEX_LOGGER_TOKEN = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const common_1 = require("@nestjs/common");
|
|
6
|
+
const observability_request_context_1 = require("@dex-monit/observability-request-context");
|
|
4
7
|
/**
|
|
5
8
|
* Token for injecting DexLoggerService
|
|
6
9
|
*/
|
|
7
|
-
|
|
10
|
+
exports.DEX_LOGGER_TOKEN = 'DEX_LOGGER_SERVICE';
|
|
8
11
|
/**
|
|
9
12
|
* DexLoggerService - NestJS compatible logger that sends logs to monitoring
|
|
10
13
|
*
|
|
@@ -29,7 +32,7 @@ export const DEX_LOGGER_TOKEN = 'DEX_LOGGER_SERVICE';
|
|
|
29
32
|
* ```
|
|
30
33
|
*/
|
|
31
34
|
let DexLoggerService = (() => {
|
|
32
|
-
let _classDecorators = [Injectable({ scope: Scope.TRANSIENT })];
|
|
35
|
+
let _classDecorators = [(0, common_1.Injectable)({ scope: common_1.Scope.TRANSIENT })];
|
|
33
36
|
let _classDescriptor;
|
|
34
37
|
let _classExtraInitializers = [];
|
|
35
38
|
let _classThis;
|
|
@@ -37,10 +40,10 @@ let DexLoggerService = (() => {
|
|
|
37
40
|
static { _classThis = this; }
|
|
38
41
|
static {
|
|
39
42
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
|
|
40
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
43
|
+
tslib_1.__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
41
44
|
DexLoggerService = _classThis = _classDescriptor.value;
|
|
42
45
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
43
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
46
|
+
tslib_1.__runInitializers(_classThis, _classExtraInitializers);
|
|
44
47
|
}
|
|
45
48
|
context;
|
|
46
49
|
monitoringClient;
|
|
@@ -86,7 +89,7 @@ let DexLoggerService = (() => {
|
|
|
86
89
|
*/
|
|
87
90
|
writeLog(level, message, context, extra) {
|
|
88
91
|
const ctx = context || this.context || 'Application';
|
|
89
|
-
const requestContext = RequestContextService.get();
|
|
92
|
+
const requestContext = observability_request_context_1.RequestContextService.get();
|
|
90
93
|
const timestamp = new Date().toISOString();
|
|
91
94
|
// Format for console output
|
|
92
95
|
const logData = {
|
|
@@ -169,4 +172,4 @@ let DexLoggerService = (() => {
|
|
|
169
172
|
};
|
|
170
173
|
return DexLoggerService = _classThis;
|
|
171
174
|
})();
|
|
172
|
-
|
|
175
|
+
exports.DexLoggerService = DexLoggerService;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { NestInterceptor, ExecutionContext, CallHandler } from '@nestjs/common';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
|
-
import { MonitoringClient } from './monitoring-client
|
|
3
|
+
import { MonitoringClient } from './monitoring-client';
|
|
4
4
|
/**
|
|
5
5
|
* Error Capture Interceptor
|
|
6
6
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error-capture.interceptor.d.ts","sourceRoot":"","sources":["../../src/lib/error-capture.interceptor.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,eAAe,EACf,gBAAgB,EAChB,WAAW,EACZ,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,UAAU,EAAc,MAAM,MAAM,CAAC;AAI9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"error-capture.interceptor.d.ts","sourceRoot":"","sources":["../../src/lib/error-capture.interceptor.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,eAAe,EACf,gBAAgB,EAChB,WAAW,EACZ,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,UAAU,EAAc,MAAM,MAAM,CAAC;AAI9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD;;;;;;GAMG;AACH,qBACa,uBAAwB,YAAW,eAAe;IAE3D,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAC;gBAAjB,gBAAgB,CAAC,EAAE,gBAAgB,YAAA;IAGtD,SAAS,CAAC,OAAO,EAAE,gBAAgB,EAAE,IAAI,EAAE,WAAW,GAAG,UAAU,CAAC,OAAO,CAAC;IAY5E,OAAO,CAAC,YAAY;IAkEpB,OAAO,CAAC,UAAU;IAQlB,OAAO,CAAC,eAAe;IAevB,OAAO,CAAC,YAAY;IAiBpB,OAAO,CAAC,eAAe;CASxB"}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ErrorCaptureInterceptor = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const common_1 = require("@nestjs/common");
|
|
6
|
+
const rxjs_1 = require("rxjs");
|
|
7
|
+
const operators_1 = require("rxjs/operators");
|
|
8
|
+
const os = tslib_1.__importStar(require("os"));
|
|
6
9
|
/**
|
|
7
10
|
* Error Capture Interceptor
|
|
8
11
|
*
|
|
@@ -11,7 +14,7 @@ import * as os from 'os';
|
|
|
11
14
|
* so this will capture errors even if another filter handles them.
|
|
12
15
|
*/
|
|
13
16
|
let ErrorCaptureInterceptor = (() => {
|
|
14
|
-
let _classDecorators = [Injectable()];
|
|
17
|
+
let _classDecorators = [(0, common_1.Injectable)()];
|
|
15
18
|
let _classDescriptor;
|
|
16
19
|
let _classExtraInitializers = [];
|
|
17
20
|
let _classThis;
|
|
@@ -19,21 +22,21 @@ let ErrorCaptureInterceptor = (() => {
|
|
|
19
22
|
static { _classThis = this; }
|
|
20
23
|
static {
|
|
21
24
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
|
|
22
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
25
|
+
tslib_1.__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
23
26
|
ErrorCaptureInterceptor = _classThis = _classDescriptor.value;
|
|
24
27
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
25
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
28
|
+
tslib_1.__runInitializers(_classThis, _classExtraInitializers);
|
|
26
29
|
}
|
|
27
30
|
monitoringClient;
|
|
28
31
|
constructor(monitoringClient) {
|
|
29
32
|
this.monitoringClient = monitoringClient;
|
|
30
33
|
}
|
|
31
34
|
intercept(context, next) {
|
|
32
|
-
return next.handle().pipe(catchError((error) => {
|
|
35
|
+
return next.handle().pipe((0, operators_1.catchError)((error) => {
|
|
33
36
|
// Capture the error
|
|
34
37
|
this.captureError(error, context);
|
|
35
38
|
// Re-throw so other handlers can process it
|
|
36
|
-
return throwError(() => error);
|
|
39
|
+
return (0, rxjs_1.throwError)(() => error);
|
|
37
40
|
}));
|
|
38
41
|
}
|
|
39
42
|
captureError(error, context) {
|
|
@@ -146,4 +149,4 @@ let ErrorCaptureInterceptor = (() => {
|
|
|
146
149
|
};
|
|
147
150
|
return ErrorCaptureInterceptor = _classThis;
|
|
148
151
|
})();
|
|
149
|
-
|
|
152
|
+
exports.ErrorCaptureInterceptor = ErrorCaptureInterceptor;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ExceptionFilter, ArgumentsHost } from '@nestjs/common';
|
|
2
2
|
import { Logger } from '@dex-monit/observability-logger';
|
|
3
|
-
import { MonitoringClient } from './monitoring-client
|
|
3
|
+
import { MonitoringClient } from './monitoring-client';
|
|
4
4
|
/**
|
|
5
5
|
* Global Exception Filter
|
|
6
6
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"global-exception.filter.d.ts","sourceRoot":"","sources":["../../src/lib/global-exception.filter.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EAEf,aAAa,EAId,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"global-exception.filter.d.ts","sourceRoot":"","sources":["../../src/lib/global-exception.filter.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EAEf,aAAa,EAId,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EAAE,MAAM,EAAE,MAAM,iCAAiC,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAavD;;;;;GAKG;AACH,qBAEa,qBAAsB,YAAW,eAAe;IAEzD,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAC;gBADjB,MAAM,EAAE,MAAM,EACd,gBAAgB,CAAC,EAAE,gBAAgB,YAAA;IAGtD,KAAK,CAAC,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,aAAa,GAAG,IAAI;IAiFpD;;OAEG;IACH,OAAO,CAAC,eAAe;CAcxB"}
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GlobalExceptionFilter = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const common_1 = require("@nestjs/common");
|
|
6
|
+
const observability_request_context_1 = require("@dex-monit/observability-request-context");
|
|
4
7
|
/**
|
|
5
8
|
* Global Exception Filter
|
|
6
9
|
*
|
|
@@ -8,7 +11,7 @@ import { RequestContextService } from '@dex-monit/observability-request-context'
|
|
|
8
11
|
* Returns a standardized error response with request ID for correlation.
|
|
9
12
|
*/
|
|
10
13
|
let GlobalExceptionFilter = (() => {
|
|
11
|
-
let _classDecorators = [Catch(), Injectable()];
|
|
14
|
+
let _classDecorators = [(0, common_1.Catch)(), (0, common_1.Injectable)()];
|
|
12
15
|
let _classDescriptor;
|
|
13
16
|
let _classExtraInitializers = [];
|
|
14
17
|
let _classThis;
|
|
@@ -16,10 +19,10 @@ let GlobalExceptionFilter = (() => {
|
|
|
16
19
|
static { _classThis = this; }
|
|
17
20
|
static {
|
|
18
21
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
|
|
19
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
22
|
+
tslib_1.__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
20
23
|
GlobalExceptionFilter = _classThis = _classDescriptor.value;
|
|
21
24
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
22
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
25
|
+
tslib_1.__runInitializers(_classThis, _classExtraInitializers);
|
|
23
26
|
}
|
|
24
27
|
logger;
|
|
25
28
|
monitoringClient;
|
|
@@ -33,14 +36,14 @@ let GlobalExceptionFilter = (() => {
|
|
|
33
36
|
const response = ctx.getResponse();
|
|
34
37
|
const request = ctx.getRequest();
|
|
35
38
|
// Get request context
|
|
36
|
-
const requestContext = RequestContextService.get();
|
|
39
|
+
const requestContext = observability_request_context_1.RequestContextService.get();
|
|
37
40
|
const requestId = requestContext?.requestId;
|
|
38
41
|
// Determine status code and error details
|
|
39
|
-
let statusCode = HttpStatus.INTERNAL_SERVER_ERROR;
|
|
42
|
+
let statusCode = common_1.HttpStatus.INTERNAL_SERVER_ERROR;
|
|
40
43
|
let message = 'Internal server error';
|
|
41
44
|
let errorName = 'InternalServerError';
|
|
42
45
|
let stack;
|
|
43
|
-
if (exception instanceof HttpException) {
|
|
46
|
+
if (exception instanceof common_1.HttpException) {
|
|
44
47
|
statusCode = exception.getStatus();
|
|
45
48
|
const exceptionResponse = exception.getResponse();
|
|
46
49
|
if (typeof exceptionResponse === 'string') {
|
|
@@ -118,4 +121,4 @@ let GlobalExceptionFilter = (() => {
|
|
|
118
121
|
};
|
|
119
122
|
return GlobalExceptionFilter = _classThis;
|
|
120
123
|
})();
|
|
121
|
-
|
|
124
|
+
exports.GlobalExceptionFilter = GlobalExceptionFilter;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { NestInterceptor, ExecutionContext, CallHandler } from '@nestjs/common';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import { Request, Response } from 'express';
|
|
4
|
-
import { MonitoringClient } from './monitoring-client
|
|
4
|
+
import { MonitoringClient } from './monitoring-client';
|
|
5
5
|
export declare const HTTP_TRACE_MONITORING_TOKEN = "HTTP_TRACE_MONITORING_CLIENT";
|
|
6
6
|
export interface HttpTrace {
|
|
7
7
|
id: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http-interceptor.d.ts","sourceRoot":"","sources":["../../src/lib/http-interceptor.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,eAAe,EACf,gBAAgB,EAChB,WAAW,EACZ,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAElC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,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+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HttpTraceInterceptor = exports.HTTP_TRACE_MONITORING_TOKEN = void 0;
|
|
4
|
+
exports.getHttpTraces = getHttpTraces;
|
|
5
|
+
exports.filterTraces = filterTraces;
|
|
6
|
+
exports.clearTraces = clearTraces;
|
|
7
|
+
exports.getTraceStats = getTraceStats;
|
|
8
|
+
exports.createHttpTraceMiddleware = createHttpTraceMiddleware;
|
|
9
|
+
const tslib_1 = require("tslib");
|
|
10
|
+
const common_1 = require("@nestjs/common");
|
|
11
|
+
const operators_1 = require("rxjs/operators");
|
|
12
|
+
const monitoring_client_1 = require("./monitoring-client");
|
|
13
|
+
const observability_request_context_1 = require("@dex-monit/observability-request-context");
|
|
6
14
|
// Token for injecting monitoring client
|
|
7
|
-
|
|
15
|
+
exports.HTTP_TRACE_MONITORING_TOKEN = 'HTTP_TRACE_MONITORING_CLIENT';
|
|
8
16
|
// In-memory storage for recent traces (circular buffer)
|
|
9
17
|
const MAX_TRACES = 1000;
|
|
10
18
|
let traces = [];
|
|
@@ -12,13 +20,13 @@ let traceIndex = 0;
|
|
|
12
20
|
/**
|
|
13
21
|
* Get all captured HTTP traces
|
|
14
22
|
*/
|
|
15
|
-
|
|
23
|
+
function getHttpTraces() {
|
|
16
24
|
return [...traces].sort((a, b) => new Date(b.timestamp).getTime() - new Date(a.timestamp).getTime());
|
|
17
25
|
}
|
|
18
26
|
/**
|
|
19
27
|
* Get traces filtered by criteria
|
|
20
28
|
*/
|
|
21
|
-
|
|
29
|
+
function filterTraces(options) {
|
|
22
30
|
return getHttpTraces().filter((trace) => {
|
|
23
31
|
if (options.method && trace.method !== options.method)
|
|
24
32
|
return false;
|
|
@@ -36,14 +44,14 @@ export function filterTraces(options) {
|
|
|
36
44
|
/**
|
|
37
45
|
* Clear all traces
|
|
38
46
|
*/
|
|
39
|
-
|
|
47
|
+
function clearTraces() {
|
|
40
48
|
traces = [];
|
|
41
49
|
traceIndex = 0;
|
|
42
50
|
}
|
|
43
51
|
/**
|
|
44
52
|
* Get trace statistics
|
|
45
53
|
*/
|
|
46
|
-
|
|
54
|
+
function getTraceStats() {
|
|
47
55
|
const allTraces = getHttpTraces();
|
|
48
56
|
const total = allTraces.length;
|
|
49
57
|
if (total === 0) {
|
|
@@ -103,7 +111,7 @@ export function getTraceStats() {
|
|
|
103
111
|
* HTTP Interceptor for capturing all requests
|
|
104
112
|
*/
|
|
105
113
|
let HttpTraceInterceptor = (() => {
|
|
106
|
-
let _classDecorators = [Injectable()];
|
|
114
|
+
let _classDecorators = [(0, common_1.Injectable)()];
|
|
107
115
|
let _classDescriptor;
|
|
108
116
|
let _classExtraInitializers = [];
|
|
109
117
|
let _classThis;
|
|
@@ -111,10 +119,10 @@ let HttpTraceInterceptor = (() => {
|
|
|
111
119
|
static { _classThis = this; }
|
|
112
120
|
static {
|
|
113
121
|
const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
|
|
114
|
-
__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
122
|
+
tslib_1.__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
|
|
115
123
|
HttpTraceInterceptor = _classThis = _classDescriptor.value;
|
|
116
124
|
if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
|
|
117
|
-
__runInitializers(_classThis, _classExtraInitializers);
|
|
125
|
+
tslib_1.__runInitializers(_classThis, _classExtraInitializers);
|
|
118
126
|
}
|
|
119
127
|
monitoringClient;
|
|
120
128
|
constructor(monitoringClient) {
|
|
@@ -128,7 +136,7 @@ let HttpTraceInterceptor = (() => {
|
|
|
128
136
|
const http = context.switchToHttp();
|
|
129
137
|
const request = http.getRequest();
|
|
130
138
|
const response = http.getResponse();
|
|
131
|
-
const requestContext = RequestContextService.get();
|
|
139
|
+
const requestContext = observability_request_context_1.RequestContextService.get();
|
|
132
140
|
// Extract request info
|
|
133
141
|
const method = request.method;
|
|
134
142
|
const url = request.originalUrl || request.url;
|
|
@@ -140,7 +148,7 @@ let HttpTraceInterceptor = (() => {
|
|
|
140
148
|
const contentLength = request.headers['content-length']
|
|
141
149
|
? parseInt(request.headers['content-length'], 10)
|
|
142
150
|
: undefined;
|
|
143
|
-
return next.handle().pipe(tap((responseBody) => {
|
|
151
|
+
return next.handle().pipe((0, operators_1.tap)((responseBody) => {
|
|
144
152
|
const duration = Date.now() - startTime;
|
|
145
153
|
const statusCode = response.statusCode;
|
|
146
154
|
this.recordTrace({
|
|
@@ -160,7 +168,7 @@ let HttpTraceInterceptor = (() => {
|
|
|
160
168
|
params: request.params,
|
|
161
169
|
responseSize: this.getResponseSize(responseBody),
|
|
162
170
|
});
|
|
163
|
-
}), catchError((error) => {
|
|
171
|
+
}), (0, operators_1.catchError)((error) => {
|
|
164
172
|
const duration = Date.now() - startTime;
|
|
165
173
|
const statusCode = error.status || error.statusCode || 500;
|
|
166
174
|
this.recordTrace({
|
|
@@ -198,7 +206,7 @@ let HttpTraceInterceptor = (() => {
|
|
|
198
206
|
traceIndex = (traceIndex + 1) % MAX_TRACES;
|
|
199
207
|
}
|
|
200
208
|
// Add breadcrumb
|
|
201
|
-
addBreadcrumb({
|
|
209
|
+
(0, monitoring_client_1.addBreadcrumb)({
|
|
202
210
|
category: 'http',
|
|
203
211
|
type: 'http',
|
|
204
212
|
message: `${data.method} ${data.path}`,
|
|
@@ -293,12 +301,12 @@ let HttpTraceInterceptor = (() => {
|
|
|
293
301
|
};
|
|
294
302
|
return HttpTraceInterceptor = _classThis;
|
|
295
303
|
})();
|
|
296
|
-
|
|
304
|
+
exports.HttpTraceInterceptor = HttpTraceInterceptor;
|
|
297
305
|
/**
|
|
298
306
|
* Middleware to capture HTTP requests (alternative to interceptor)
|
|
299
307
|
* Use this if you need to capture requests before NestJS routing
|
|
300
308
|
*/
|
|
301
|
-
|
|
309
|
+
function createHttpTraceMiddleware() {
|
|
302
310
|
return (req, res, next) => {
|
|
303
311
|
const startTime = Date.now();
|
|
304
312
|
const method = req.method;
|
|
@@ -316,7 +324,7 @@ export function createHttpTraceMiddleware() {
|
|
|
316
324
|
const originalEnd = res.end.bind(res);
|
|
317
325
|
res.end = function (chunk, encoding, cb) {
|
|
318
326
|
const duration = Date.now() - startTime;
|
|
319
|
-
const requestContext = RequestContextService.get();
|
|
327
|
+
const requestContext = observability_request_context_1.RequestContextService.get();
|
|
320
328
|
const trace = {
|
|
321
329
|
id: `trace-${Date.now()}-${Math.random().toString(36).substring(7)}`,
|
|
322
330
|
timestamp: new Date().toISOString(),
|
|
@@ -342,7 +350,7 @@ export function createHttpTraceMiddleware() {
|
|
|
342
350
|
traceIndex = (traceIndex + 1) % MAX_TRACES;
|
|
343
351
|
}
|
|
344
352
|
// Add breadcrumb
|
|
345
|
-
addBreadcrumb({
|
|
353
|
+
(0, monitoring_client_1.addBreadcrumb)({
|
|
346
354
|
category: 'http',
|
|
347
355
|
type: 'http',
|
|
348
356
|
message: `${method} ${path}`,
|
|
@@ -1,7 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MonitoringClient = void 0;
|
|
4
|
+
exports.createMonitoringClient = createMonitoringClient;
|
|
5
|
+
exports.addBreadcrumb = addBreadcrumb;
|
|
6
|
+
exports.getBreadcrumbs = getBreadcrumbs;
|
|
7
|
+
exports.clearBreadcrumbs = clearBreadcrumbs;
|
|
8
|
+
exports.addHttpBreadcrumb = addHttpBreadcrumb;
|
|
9
|
+
exports.addConsoleBreadcrumb = addConsoleBreadcrumb;
|
|
10
|
+
const tslib_1 = require("tslib");
|
|
11
|
+
const uuid_1 = require("uuid");
|
|
12
|
+
const fs = tslib_1.__importStar(require("fs"));
|
|
13
|
+
const observability_request_context_1 = require("@dex-monit/observability-request-context");
|
|
14
|
+
const observability_scrubber_1 = require("@dex-monit/observability-scrubber");
|
|
5
15
|
// Cache for source files to avoid re-reading
|
|
6
16
|
const sourceFileCache = new Map();
|
|
7
17
|
const MAX_CACHE_SIZE = 100;
|
|
@@ -111,7 +121,7 @@ function generateFingerprint(error) {
|
|
|
111
121
|
* Client for sending error events to the monitoring service.
|
|
112
122
|
* Automatically captures request context and scrubs sensitive data.
|
|
113
123
|
*/
|
|
114
|
-
|
|
124
|
+
class MonitoringClient {
|
|
115
125
|
config;
|
|
116
126
|
constructor(config) {
|
|
117
127
|
this.config = {
|
|
@@ -134,8 +144,8 @@ export class MonitoringClient {
|
|
|
134
144
|
if (!this.config.enabled) {
|
|
135
145
|
return null;
|
|
136
146
|
}
|
|
137
|
-
const eventId =
|
|
138
|
-
const requestContext = RequestContextService.get();
|
|
147
|
+
const eventId = (0, uuid_1.v4)();
|
|
148
|
+
const requestContext = observability_request_context_1.RequestContextService.get();
|
|
139
149
|
// Build the error event
|
|
140
150
|
let event = {
|
|
141
151
|
eventId,
|
|
@@ -174,7 +184,7 @@ export class MonitoringClient {
|
|
|
174
184
|
},
|
|
175
185
|
};
|
|
176
186
|
// Scrub sensitive data
|
|
177
|
-
event = scrubSensitiveData(event, this.config.scrubberOptions);
|
|
187
|
+
event = (0, observability_scrubber_1.scrubSensitiveData)(event, this.config.scrubberOptions);
|
|
178
188
|
// Run beforeSend hook
|
|
179
189
|
const processedEvent = this.config.beforeSend(event);
|
|
180
190
|
if (!processedEvent) {
|
|
@@ -198,8 +208,8 @@ export class MonitoringClient {
|
|
|
198
208
|
if (!this.config.enabled) {
|
|
199
209
|
return null;
|
|
200
210
|
}
|
|
201
|
-
const eventId =
|
|
202
|
-
const requestContext = RequestContextService.get();
|
|
211
|
+
const eventId = (0, uuid_1.v4)();
|
|
212
|
+
const requestContext = observability_request_context_1.RequestContextService.get();
|
|
203
213
|
let event = {
|
|
204
214
|
eventId,
|
|
205
215
|
timestamp: new Date().toISOString(),
|
|
@@ -230,7 +240,7 @@ export class MonitoringClient {
|
|
|
230
240
|
},
|
|
231
241
|
};
|
|
232
242
|
// Scrub sensitive data
|
|
233
|
-
event = scrubSensitiveData(event, this.config.scrubberOptions);
|
|
243
|
+
event = (0, observability_scrubber_1.scrubSensitiveData)(event, this.config.scrubberOptions);
|
|
234
244
|
// Run beforeSend hook
|
|
235
245
|
const processedEvent = this.config.beforeSend(event);
|
|
236
246
|
if (!processedEvent) {
|
|
@@ -252,9 +262,9 @@ export class MonitoringClient {
|
|
|
252
262
|
if (!this.config.enabled) {
|
|
253
263
|
return;
|
|
254
264
|
}
|
|
255
|
-
const requestContext = RequestContextService.get();
|
|
265
|
+
const requestContext = observability_request_context_1.RequestContextService.get();
|
|
256
266
|
const logEvent = {
|
|
257
|
-
id:
|
|
267
|
+
id: (0, uuid_1.v4)(),
|
|
258
268
|
timestamp: new Date().toISOString(),
|
|
259
269
|
level,
|
|
260
270
|
message,
|
|
@@ -264,7 +274,7 @@ export class MonitoringClient {
|
|
|
264
274
|
requestId: requestContext?.requestId,
|
|
265
275
|
transactionId: requestContext?.transactionId,
|
|
266
276
|
data: data
|
|
267
|
-
? scrubSensitiveData(data, this.config.scrubberOptions)
|
|
277
|
+
? (0, observability_scrubber_1.scrubSensitiveData)(data, this.config.scrubberOptions)
|
|
268
278
|
: undefined,
|
|
269
279
|
tags,
|
|
270
280
|
};
|
|
@@ -283,9 +293,9 @@ export class MonitoringClient {
|
|
|
283
293
|
if (!this.config.enabled || logs.length === 0) {
|
|
284
294
|
return;
|
|
285
295
|
}
|
|
286
|
-
const requestContext = RequestContextService.get();
|
|
296
|
+
const requestContext = observability_request_context_1.RequestContextService.get();
|
|
287
297
|
const logEvents = logs.map((log) => ({
|
|
288
|
-
id:
|
|
298
|
+
id: (0, uuid_1.v4)(),
|
|
289
299
|
timestamp: log.timestamp || new Date().toISOString(),
|
|
290
300
|
level: log.level,
|
|
291
301
|
message: log.message,
|
|
@@ -295,7 +305,7 @@ export class MonitoringClient {
|
|
|
295
305
|
requestId: requestContext?.requestId,
|
|
296
306
|
transactionId: requestContext?.transactionId,
|
|
297
307
|
data: log.data
|
|
298
|
-
? scrubSensitiveData(log.data, this.config.scrubberOptions)
|
|
308
|
+
? (0, observability_scrubber_1.scrubSensitiveData)(log.data, this.config.scrubberOptions)
|
|
299
309
|
: undefined,
|
|
300
310
|
tags: log.tags,
|
|
301
311
|
}));
|
|
@@ -411,16 +421,17 @@ export class MonitoringClient {
|
|
|
411
421
|
};
|
|
412
422
|
}
|
|
413
423
|
}
|
|
424
|
+
exports.MonitoringClient = MonitoringClient;
|
|
414
425
|
/**
|
|
415
426
|
* Create a monitoring client instance
|
|
416
427
|
*/
|
|
417
|
-
|
|
428
|
+
function createMonitoringClient(config) {
|
|
418
429
|
return new MonitoringClient(config);
|
|
419
430
|
}
|
|
420
431
|
/**
|
|
421
432
|
* Add a breadcrumb to the global breadcrumb trail
|
|
422
433
|
*/
|
|
423
|
-
|
|
434
|
+
function addBreadcrumb(breadcrumb) {
|
|
424
435
|
const crumb = {
|
|
425
436
|
timestamp: new Date().toISOString(),
|
|
426
437
|
...breadcrumb,
|
|
@@ -434,19 +445,19 @@ export function addBreadcrumb(breadcrumb) {
|
|
|
434
445
|
/**
|
|
435
446
|
* Get current breadcrumbs
|
|
436
447
|
*/
|
|
437
|
-
|
|
448
|
+
function getBreadcrumbs() {
|
|
438
449
|
return [...globalBreadcrumbs];
|
|
439
450
|
}
|
|
440
451
|
/**
|
|
441
452
|
* Clear all breadcrumbs
|
|
442
453
|
*/
|
|
443
|
-
|
|
454
|
+
function clearBreadcrumbs() {
|
|
444
455
|
globalBreadcrumbs = [];
|
|
445
456
|
}
|
|
446
457
|
/**
|
|
447
458
|
* Add an HTTP breadcrumb (convenience function)
|
|
448
459
|
*/
|
|
449
|
-
|
|
460
|
+
function addHttpBreadcrumb(data) {
|
|
450
461
|
addBreadcrumb({
|
|
451
462
|
category: 'http',
|
|
452
463
|
type: 'http',
|
|
@@ -463,7 +474,7 @@ export function addHttpBreadcrumb(data) {
|
|
|
463
474
|
/**
|
|
464
475
|
* Add a console breadcrumb (convenience function)
|
|
465
476
|
*/
|
|
466
|
-
|
|
477
|
+
function addConsoleBreadcrumb(level, message, data) {
|
|
467
478
|
addBreadcrumb({
|
|
468
479
|
category: 'console',
|
|
469
480
|
type: 'debug',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nest-logger-capture.d.ts","sourceRoot":"","sources":["../../src/lib/nest-logger-capture.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"nest-logger-capture.d.ts","sourceRoot":"","sources":["../../src/lib/nest-logger-capture.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAqFvD;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,gBAAgB,EAAE,gBAAgB,GAAG,IAAI,CAiD/E;AAED;;GAEG;AACH,wBAAgB,qBAAqB,IAAI,IAAI,CAuC5C;AAED;;GAEG;AACH,wBAAgB,yBAAyB,IAAI,OAAO,CAEnD"}
|